%define _debugsource_template %{nil} %define debug_package %{nil} %global app_id ai.storyteller.photocraft Name: photocraft Version: 0.23.1 Release: 3%{?dist} Summary: Native image editor with layers, adjustment layers and PSD support License: MIT OR Apache-2.0 URL: https://github.com/storytold/photocraft Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cargo BuildRequires: rust >= 1.90 BuildRequires: gcc BuildRequires: desktop-file-utils BuildRequires: appstream Requires: hicolor-icon-theme # The windowing and GPU libraries are loaded at runtime, so rpm does not # pick them up from the ELF headers. Requires: libxkbcommon Requires: libxkbcommon-x11 Requires: (vulkan-loader or libglvnd-egl) Recommends: libwayland-client Recommends: libX11 Recommends: libXcursor Recommends: libXi Recommends: libXrandr Recommends: mesa-vulkan-drivers Recommends: xdg-desktop-portal %description PhotoCraft is an image editor written in Rust, with the menus, shortcuts and panels of Photoshop. It supports layers, masks, adjustment layers, layer styles, type and brushes, opens and saves layered PSD and PSB files, and composites on the GPU through wgpu. The photocraft-cli binary converts files and runs editor commands without a window. %prep %autosetup -n %{name}-%{version} %build export CARGO_HOME=$PWD/.cargo-home # rpm exports Fedora's RUSTFLAGS at the start of %%build. They give every # crate full debug info and a single codegen unit, which pushes large builds # past the COPR timeout, so the upstream release profile is used instead. unset RUSTFLAGS export PHOTOCRAFT_BUILD_DATE=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%%s)}" +%%F) cargo build --release --locked -p photocraft -p photocraft-cli %install install -Dpm 0755 target/release/photocraft %{buildroot}%{_bindir}/photocraft install -Dpm 0755 target/release/photocraft-cli %{buildroot}%{_bindir}/photocraft-cli install -Dpm 0644 packaging/linux/%{app_id}.desktop \ %{buildroot}%{_datadir}/applications/%{app_id}.desktop install -Dpm 0644 packaging/linux/%{app_id}.mime.xml \ %{buildroot}%{_datadir}/mime/packages/%{app_id}.xml install -d %{buildroot}%{_metainfodir} sed -e 's/@VERSION@/%{version}/g' \ -e "s/@DATE@/$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%%s)}" +%%F)/g" \ packaging/linux/%{app_id}.metainfo.xml.in \ > %{buildroot}%{_metainfodir}/%{app_id}.metainfo.xml install -d %{buildroot}%{_datadir}/icons cp -a assets/app-icon/hicolor %{buildroot}%{_datadir}/icons/ %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{app_id}.desktop appstreamcli validate --no-net %{buildroot}%{_metainfodir}/%{app_id}.metainfo.xml %files %license assets/app-icon/LICENSE.txt %doc README.md %{_bindir}/photocraft %{_bindir}/photocraft-cli %{_datadir}/applications/%{app_id}.desktop %{_datadir}/mime/packages/%{app_id}.xml %{_metainfodir}/%{app_id}.metainfo.xml %{_datadir}/icons/hicolor/*/apps/%{app_id}.* %changelog * Sat Nov 14 2026 sachesi - 0.23.1-3 - Unset the Rust flags rpm exports in %%build, so the upstream release profile applies. * Fri Nov 13 2026 sachesi - 0.23.1-2 - Drop the explicit export of the Fedora Rust flags. * Thu Nov 12 2026 sachesi - 0.23.1-1 - Update to 0.23.1. * Mon Nov 09 2026 sachesi - 0.21.0-1 - Update to 0.21.0. * Thu Nov 05 2026 sachesi - 0.20.2-1 - Update to 0.20.2. * Tue Nov 03 2026 sachesi - 0.20.1-1 - Update to 0.20.1. * Sat Oct 31 2026 sachesi - 0.18.0-1 - Update to 0.18.0. * Wed Oct 28 2026 sachesi - 0.17.0-1 - Update to 0.17.0. * Mon Oct 26 2026 sachesi - 0.16.0-1 - Update to 0.16.0. * Sat Oct 24 2026 sachesi - 0.15.1-1 - Update to 0.15.1. * Wed Oct 21 2026 sachesi - 0.11.1-1 - Update to 0.11.1. * Sun Oct 18 2026 sachesi - 0.10.0-1 - Update to 0.10.0. * Wed Oct 14 2026 sachesi - 0.9.0-1 - Update to 0.9.0. * Tue Oct 13 2026 sachesi - 0.8.2-2 - Require libxkbcommon-x11, which the windowing code loads at run time. * Tue Oct 13 2026 sachesi - 0.8.2-1 - Update to 0.8.2. * Sun Oct 11 2026 sachesi - 0.7.0-1 - Update to 0.7.0. * Sat Oct 10 2026 sachesi - 0.6.0-1 - Update to 0.6.0. * Thu Oct 08 2026 sachesi - 0.5.0-1 - Update to 0.5.0. * Thu Oct 08 2026 sachesi - 0.3.0-1 - Update to 0.3.0. * Sat Oct 03 2026 sachesi - 0.1.1-1 - Initial package for Copr.