Sophie

Sophie

distrib > Mageia > 8 > x86_64 > by-pkgid > 2e110a01e252a2ac06e9513483d7f569 > files > 7

cups-pdf-3.0.1-2.mga8.src.rpm

Summary:        Extension for creating pdf-Files with CUPS
Name:           cups-pdf
Version:        3.0.1
Release:        %mkrel 2
Group:          System/Printing
License:        GPLv2+
URL:            http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/
Source0:        http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/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

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 http://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.

%prep
%setup -q
cp %{SOURCE1} INSTALL.RPM

# Relocate output on user's Desktop
%autopatch -p0

%build
pushd src
gcc %{optflags} -lcups -o cups-pdf cups-pdf.c
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
* Sat Feb 15 2020 umeabot <umeabot> 3.0.1-2.mga8
+ Revision: 1525394
- Mageia 8 Mass Rebuild

* Sun Apr 14 2019 daviddavid <daviddavid> 3.0.1-1.mga7
+ Revision: 1390038
- new version: 3.0.1

* Sun Sep 23 2018 umeabot <umeabot> 2.6.1-7.mga7
+ Revision: 1297371
- Mageia 7 Mass Rebuild

* Mon Feb 08 2016 umeabot <umeabot> 2.6.1-6.mga6
+ Revision: 944845
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 2.6.1-5.mga5
+ Revision: 749987
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 2.6.1-4.mga5
+ Revision: 678635
- Mageia 5 Mass Rebuild

* Fri Oct 18 2013 umeabot <umeabot> 2.6.1-3.mga4
+ Revision: 503659
- Mageia 4 Mass Rebuild

* Fri Jan 11 2013 umeabot <umeabot> 2.6.1-2.mga3
+ Revision: 348472
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Dec 30 2011 supp <supp> 2.6.1-1.mga2
+ Revision: 188831
- update to 2.6.1

* Thu Mar 17 2011 ennael <ennael> 2.5.1-1.mga1
+ Revision: 73239
- clean spec file
- imported package cups-pdf


* Tue Mar 15 2011 Stéphane Téletchéa <steletch@mandriva.org> 2.5.1-1mdv2011.0
+ Revision: 645099
- update to new version 2.5.1

* Thu Dec 09 2010 Oden Eriksson <oeriksson@mandriva.com> 2.5.0-3mdv2011.0
+ Revision: 617480
- the mass rebuild of 2010.0 packages

* Thu Sep 10 2009 Thierry Vignaud <tv@mandriva.org> 2.5.0-2mdv2010.0
+ Revision: 437165
- rebuild

* Thu Mar 19 2009 Frederik Himpe <fhimpe@mandriva.org> 2.5.0-1mdv2009.1
+ Revision: 357560
- Import package, based on Fedora RPM
- create cups-pdf