%define _debugsource_template %{nil} %define debug_package %{nil} %global app_id ai.storyteller.wordcraft Name: wordcraft Version: 0.6.1 Release: 2%{?dist} Summary: Open-source native word processor License: MIT OR Apache-2.0 URL: https://github.com/storytold/wordcraft Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cargo BuildRequires: rust >= 1.90 BuildRequires: gcc BuildRequires: gcc-c++ 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 WordCraft is an open-source, native word processor that works the way Word users expect. The ribbon, styles, tables, track changes, references and mail merge; reads and writes .docx, opens .odt, .rtf, .html, .md and .txt, and exports PDF. The wordcraft-cli binary converts and runs commands without a window. %prep %autosetup -n %{name}-%{version} %build export CARGO_HOME=$PWD/.cargo-home export RUSTFLAGS="%{?build_rustflags}" export WORDCRAFT_BUILD_DATE=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%%s)}" +%%F) cargo build --release --locked -p wordcraft -p wordcraft-cli %install install -Dpm 0755 target/release/wordcraft %{buildroot}%{_bindir}/wordcraft install -Dpm 0755 target/release/wordcraft-cli %{buildroot}%{_bindir}/wordcraft-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 LICENSE-APACHE LICENSE-MIT %doc README.md %{_bindir}/wordcraft %{_bindir}/wordcraft-cli %{_datadir}/applications/%{app_id}.desktop %{_datadir}/mime/packages/%{app_id}.xml %{_metainfodir}/%{app_id}.metainfo.xml %{_datadir}/icons/hicolor/*/apps/%{app_id}.* %changelog * Tue Oct 13 2026 sachesi - 0.6.1-2 - Require libxkbcommon-x11, which the windowing code loads at run time. * Tue Oct 13 2026 sachesi - 0.6.1-1 - Initial package for Copr.