Summary: Extension for creating pdf-Files with CUPS Summary(fr): Extension de CUPS pour créer des fichiers PDF Name: cups-pdf Version: 3.0.2 Release: %mkrel 1 Group: System/Printing License: GPLv2+ URL: https://www.cups-pdf.de/ Source0: https://www.cups-pdf.de/src/%{name}_%{version}.tar.gz Source1: INSTALL.mageia.cups-pdf # Default value for Out ${DESKTOP} Patch1: cups-pdf-conf.patch # Handle ${DESKTOP} from config Patch2: cups-pdf-desktop.patch # Handle new lines in title Patch3: cups-pdf-title.patch # Fix build warning Patch4: cups-pdf-build.patch # Report error/success in log Patch5: cups-pdf-result.patch # Replace removed gs .setpdfwrite option Source6: cups-pdf-setpdfwrite.patch # Fix processing of lines with embedded null characters Patch7: cups-pdf-fix-null-chars.patch BuildRequires: gcc BuildRequires: cups-devel Requires: ghostscript Requires: cups # These are the defaults paths defined in config.h # CUPS-PDF spool directory %define CPSPOOL %{_localstatedir}/spool/cups-pdf/SPOOL # CUPS-PDF output directory %define CPOUT %{_localstatedir}/spool/cups-pdf # CUPS-PDF log directory %define CPLOG %{_localstatedir}/log/cups # CUPS-PDF cups-pdf.conf config file %define ETCCUPS %(cups-config --serverroot 2>/dev/null || echo %{_sysconfdir}/cups) # Additional path to backend directory %define CPBACKEND %(cups-config --serverbin 2>/dev/null || echo %{_libdir}/cups)/backend %description "cups-pdf" is a backend script for use with CUPS - the "Common UNIX Printing System" (see more for CUPS under https://www.cups.org/). "cups-pdf" uses the ghostscript pdfwrite device to produce PDF Files. This version has been modified to store the PDF files on the Desktop of the user. This behavior can be changed by editing the configuration file. %description -l fr "cups-pdf" est un script de traitement CUPS - le "Common UNIX Printing System" (plus d'informations sur CUPS à l'adresse https://www.cups.org/). "cups-pdf" utilise ghostscript pour construire des fichiers au format PDF. Cette version a été modifiée pour produire les fichiers PDF sur le bureau de l'utilisateur (dossier Desktop du répertoire d'accueil de l'utilisateur). Ce comportement peut être modifié en éditant le fichier de configuration. %prep %setup -q cp %{SOURCE1} INSTALL.RPM # Relocate output on user's Desktop %autopatch -p0 %build pushd src %{__cc} %{optflags} %{ldflags} -D_GNU_SOURCE -o cups-pdf cups-pdf.c -lcups popd %install mkdir -p %{buildroot}%{CPBACKEND} mkdir -p %{buildroot}%{CPSPOOL} mkdir -p %{buildroot}%{CPOUT} mkdir -p %{buildroot}%{CPLOG} mkdir -p %{buildroot}%{CPBACKEND} mkdir -p %{buildroot}%{ETCCUPS} mkdir -p %{buildroot}%{_datadir}/cups/model/ install -m644 extra/{CUPS-PDF_noopt,CUPS-PDF_opt}.ppd %{buildroot}%{_datadir}/cups/model/ install -m644 extra/cups-pdf.conf %{buildroot}%{ETCCUPS}/ install -m700 src/cups-pdf %{buildroot}%{CPBACKEND}/ %post # First install : create the printer if cupsd is running if [ "$1" -eq "1" -a -f "%{_var}/run/cupsd.pid" ] then if [ -d /proc/$(cat %{_var}/run/cupsd.pid) ] then /usr/sbin/lpadmin -p Cups-PDF -v cups-pdf:/ -m CUPS-PDF.ppd -E || : fi fi %postun if [ "$1" -eq "0" ]; then # Delete the printer /usr/sbin/lpadmin -x Cups-PDF || : fi %files %doc ChangeLog COPYING README INSTALL.RPM %dir %{CPSPOOL} %dir %{CPOUT} %attr(700, root, root) %{CPBACKEND}/cups-pdf %config(noreplace) %{ETCCUPS}/cups-pdf.conf %{_datadir}/cups/model/CUPS-PDF_noopt.ppd %{_datadir}/cups/model/CUPS-PDF_opt.ppd %changelog * Tue Mar 25 2025 daviddavid 3.0.2-1.mga10 + Revision: 2169811 - new version: 3.0.2 * Fri Sep 27 2024 daviddavid 3.0.1-5.mga10 + Revision: 2101548 - fix FTBFS * Wed Aug 30 2023 daviddavid 3.0.1-4.mga10 + Revision: 1981117 - add fedora patch to fix use of removed '.setpdfwrite' in GS call (mga#32198) - change default configuration to add suffix to the generated filename in order to avoid overwriting previously generated files (#1419308) - add fedora patch to fix handling of source Postscript files with embedded null inside the document lines (#2050615) - add French summary and description * Tue Mar 15 2022 umeabot 3.0.1-3.mga9 + Revision: 1792591 - Mageia 9 Mass Rebuild * Sat Feb 15 2020 umeabot 3.0.1-2.mga8 + Revision: 1525394 - Mageia 8 Mass Rebuild * Sun Apr 14 2019 daviddavid 3.0.1-1.mga7 + Revision: 1390038 - new version: 3.0.1 * Sun Sep 23 2018 umeabot 2.6.1-7.mga7 + Revision: 1297371 - Mageia 7 Mass Rebuild * Mon Feb 08 2016 umeabot 2.6.1-6.mga6 + Revision: 944845 - Mageia 6 Mass Rebuild * Wed Oct 15 2014 umeabot 2.6.1-5.mga5 + Revision: 749987 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot 2.6.1-4.mga5 + Revision: 678635 - Mageia 5 Mass Rebuild * Fri Oct 18 2013 umeabot 2.6.1-3.mga4 + Revision: 503659 - Mageia 4 Mass Rebuild * Fri Jan 11 2013 umeabot 2.6.1-2.mga3 + Revision: 348472 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Dec 30 2011 supp 2.6.1-1.mga2 + Revision: 188831 - update to 2.6.1 * Thu Mar 17 2011 ennael 2.5.1-1.mga1 + Revision: 73239 - clean spec file - imported package cups-pdf * Tue Mar 15 2011 Stéphane Téletchéa 2.5.1-1mdv2011.0 + Revision: 645099 - update to new version 2.5.1 * Thu Dec 09 2010 Oden Eriksson 2.5.0-3mdv2011.0 + Revision: 617480 - the mass rebuild of 2010.0 packages * Thu Sep 10 2009 Thierry Vignaud 2.5.0-2mdv2010.0 + Revision: 437165 - rebuild * Thu Mar 19 2009 Frederik Himpe 2.5.0-1mdv2009.1 + Revision: 357560 - Import package, based on Fedora RPM - create cups-pdf