%global forgeurl https://github.com/OpenPrinting/gutenprint-printer-app/ %global commit 9590f5355a93ebf28dd905074343c170ac6a9305 %forgemeta Name: gutenprint-printer-app Version: 0 Release: 2%{?dist} License: ASL 2.0 Summary: Printer Application for Gutenprint printers that uses PAPPL to support IPP printing from multiple operating systems. URL: %{forgeurl} Source0: %{forgesource} Source1: gutenprint-printer-app.sysusers #Services which run as root cannot create listener sockets Patch0: gutenprint-printer-app_service-user.patch BuildRequires: make BuildRequires: gcc BuildRequires: systemd-rpm-macros BuildRequires: cups-devel #Git builds so no pkgconfig BuildRequires: pappl-devel >= 1.1b2 BuildRequires: pappl-retrofit-devel BuildRequires: cups-filters-devel >= 2.0.0 %description A Printer Application for printing with the Gutenprint printer driver. This allows high-quality printing on a wide range of inkjet, lasre, and dye-sublimation printers, especially inkjets from Epson and Canon, PCL laser printers (both monochrome and color), and dye-sublimation photo printers. This driver is especially recommended for photos and fine-art printing. It is also an alternative to the Ghostscript Printer Application for PCL 4/5c/e laser printers. %prep %forgesetup %patch0 -p1 %build %make_build %install %make_install libdir=%{buildroot}%{_libdir} serverbin=%{buildroot}%{_libdir}/gutenprint-printer-app install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/gutenprint-printer-app.conf %pre %sysusers_create_compat %{SOURCE1} %post %systemd_post gutenprint-printer-app.service %preun %systemd_preun gutenprint-printer-app.service %postun %systemd_postun_with_restart gutenprint-printer-app.service %files %license %{_bindir}/gutenprint-printer-app %{_libdir}/gutenprint-printer-app %{_unitdir}/gutenprint-printer-app.service %{_mandir}/man1/gutenprint-printer-app.1.gz %dir %{_datadir}/gutenprint-printer-app %{_datadir}/gutenprint-printer-app/testpage.ps %attr(-, gutenprint-printer-app, gutenprint-printer-app) %dir %{_sharedstatedir}/gutenprint-printer-app %{_sysusersdir}/gutenprint-printer-app.conf %changelog * Sun Sep 26 2021 Brandon Nielsen 0-2.20210926git9590f53 - Run service as user gutenprint-printer-app * Sun Sep 26 2021 Brandon Nielsen 0-1.20210926git9590f53 - Initial specfile