rpms/cups-pdf/F-7 cups-pdf.spec,1.5,1.6

Remi Collet (remi) fedora-extras-commits at redhat.com
Thu Aug 23 17:16:36 UTC 2007


Author: remi

Update of /cvs/extras/rpms/cups-pdf/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25001

Modified Files:
	cups-pdf.spec 
Log Message:
fix license


Index: cups-pdf.spec
===================================================================
RCS file: /cvs/extras/rpms/cups-pdf/F-7/cups-pdf.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- cups-pdf.spec	6 May 2007 07:00:34 -0000	1.5
+++ cups-pdf.spec	23 Aug 2007 17:16:03 -0000	1.6
@@ -1,11 +1,18 @@
 # Module SElinux
 %define module cups_pdf
 
+%if %{?fedora}%{?rhel} >= 5
+%define usesel 1
+%else
+%define usesel 0
+%endif
+
+
 Summary:        Extension for creating pdf-Files with CUPS
 Summary(fr):    Extension de CUPS pour créer des fichiers PDF
 Name:           cups-pdf
 Version:        2.4.6
-Release:        1%{?dist}
+Release:        3%{?dist}
 Group:          Applications/Publishing
 Source0:        http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/src/%{name}_%{version}.tar.gz
 Source1:        INSTALL.cups-pdf
@@ -13,10 +20,14 @@
 Source3:        %{module}.te
 Patch1:         cups-pdf-conf.patch
 URL:            http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/
-License:        GPL
+License:        GPLv2+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:       ghostscript, cups, policycoreutils
-BuildRequires:  selinux-policy-devel, checkpolicy, cups-devel
+Requires:       ghostscript, cups
+BuildRequires:  cups-devel
+%if %{usesel}
+Requires:       policycoreutils
+BuildRequires:  selinux-policy-devel, checkpolicy
+%endif
 
 # These are the defaults paths defined in config.h
 # CUPS-PDF spool directory
@@ -61,11 +72,18 @@
 # Relocate output on user's Desktop
 %patch1 -p0
 
+%if %{usesel}
+echo Will Use SE Linux
+%else
+echo Will NOT use SE Linux
+%endif
+
 %build
 pushd src
 %{__cc} $RPM_OPT_FLAGS -o cups-pdf cups-pdf.c
 popd
 
+%if %{usesel}
 # SElinux 
 %{__mkdir} selinux
 pushd selinux
@@ -74,6 +92,7 @@
 echo "%{CPSPOOL} system_u:object_r:print_spool_t:s0" >>%{module}.fc
 make -f %{_datadir}/selinux/devel/Makefile
 popd
+%endif
 
 # Avoid perl dependencies
 %{__chmod} -x contrib/pstitleiconv-0.2/pstitleiconv
@@ -94,9 +113,11 @@
 %{__install} -m644 extra/cups-pdf.conf %{buildroot}%{ETCCUPS}/cups-pdf.conf
 %{__install} -m755 src/cups-pdf %{buildroot}%{CPBACKEND}
 
+%if %{usesel}
 # SElinux 
 %{__mkdir_p} %{buildroot}%{_datadir}/selinux/packages/%{name}
 %{__install} -m644 selinux/%{module}.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{module}.pp
+%endif
 
 %clean
 rm -rf %{buildroot}
@@ -109,16 +130,25 @@
 %attr(700, root, root) %{CPBACKEND}/cups-pdf
 %config(noreplace) %{ETCCUPS}/cups-pdf.conf
 %{_datadir}/cups/model/PostscriptColor.ppd
+%if %{usesel}
 %{_datadir}/selinux/packages/%{name}/%{module}.pp
+%endif
 
 %post
+%if %{usesel}
 # Install/update Selinux policy
 semodule -i %{_datadir}/selinux/packages/%{name}/%{module}.pp || :
 fixfiles -R %{name} restore
+%endif
 
 # First install : create the printer if cupsd is running
 if [ "$1" -eq "1" -a -f "%{_var}/run/cupsd.pid" ]
 then
+%if %{?fedora}%{?rhel} < 5
+    # Restart CUPS on old Fedora/RHEL to discover the new "backend"
+    /sbin/service cups condrestart
+%endif
+
     if [ -d /proc/$(cat %{_var}/run/cupsd.pid) ]
     then
         /usr/sbin/lpadmin -p Cups-PDF -v cups-pdf:/ -m PostscriptColor.ppd -E || :
@@ -130,11 +160,20 @@
     # Delete the printer
     /usr/sbin/lpadmin -x Cups-PDF || :
 
+%if %{usesel}
     # Remove the SElinux policy.
     semodule -r %{module} || :
+%endif
 fi
 
 %changelog
+* Thu Aug 23 2007 Remi Collet <Fedora at FamilleCollet.com> 2.4.6-3
+- Fix License
+- F-8 rebuild (BuildID)
+
+* Sun May 06 2007 Remi Collet <Fedora at FamilleCollet.com> 2.4.6-2
+- spec changes for RHEL 4 and Fedora Core 3 and 4 (no selinux)
+
 * Sun May 06 2007 Remi Collet <Fedora at FamilleCollet.com> 2.4.6-1
 - update to 2.4.6
 




More information about the fedora-extras-commits mailing list