%define _debugsource_template %{nil} %define debug_package %{nil} %global app_id ai.storyteller.photocraft Name: photocraft Version: 0.10.0 Release: 1%{?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 export RUSTFLAGS="%{?build_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 * 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.