]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix issues in RPM spec file.
authorMichael Sweet <michael.r.sweet@gmail.com>
Sat, 17 Jun 2017 00:29:51 +0000 (20:29 -0400)
committerMichael Sweet <michael.r.sweet@gmail.com>
Sat, 17 Jun 2017 00:29:51 +0000 (20:29 -0400)
CHANGES.md
packaging/cups.spec.in

index 7788f8cecb879a054656272f4abe9a130993e320..dabb3f5db163fa45b96d6850a19b514c8af5df38 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES - 2.2.4 - 2017-06-05
+CHANGES - 2.2.4 - 2017-06-16
 ============================
 
 CHANGES IN CUPS V2.2.4
@@ -24,6 +24,7 @@ CHANGES IN CUPS V2.2.4
   haven't yet been added (Issue #5006)
 - Fixed a typo in the mime.types file.
 - Fixed a bug in the Spanish web interface template (Issue #5016)
+- Fixed some issues in the RPM spec file (Issue #5032)
 
 
 CHANGES IN CUPS V2.2.3
index 55713006b68585a596f82081902f229805e54f11..7b311ee6520d1f1a6bea1c4dda361c47988b5f0b 100644 (file)
@@ -128,6 +128,15 @@ make BUILDROOT=$RPM_BUILD_ROOT install
 rm -rf $RPM_BUILD_ROOT/usr/share/cups/banners $RPM_BUILD_ROOT/usr/share/cups/data
 
 %post
+%if %{?_with_systemd:1}%{!?_with_systemd:0}
+/bin/systemctl enable org.cups.cupsd.service
+
+if test $1 -ge 1; then
+       /bin/systemctl stop org.cups.cupsd.service
+       /bin/systemctl start org.cups.cupsd.service
+fi
+
+%else
 /sbin/chkconfig --add cups
 /sbin/chkconfig cups on
 
@@ -136,21 +145,38 @@ if test $1 -gt 1; then
        /sbin/service cups stop
        /sbin/service cups start
 fi
+%endif
 
 %post libs
 /sbin/ldconfig
 
 %preun
+%if %{?_with_systemd:1}%{!?_with_systemd:0}
+if test $1 -ge 1; then
+       /bin/systemctl stop org.cups.cupsd.service
+       /bin/systemctl disable org.cups.cupsd.service
+fi
+
+%else
 if test $1 = 0; then
        /sbin/service cups stop
        /sbin/chkconfig --del cups
 fi
+%endif
 
 %postun
+%if %{?_with_systemd:1}%{!?_with_systemd:0}
+if test $1 -ge 1; then
+       /bin/systemctl stop org.cups.cupsd.service
+       /bin/systemctl start org.cups.cupsd.service
+fi
+
+%else
 if test $1 -ge 1; then
        /sbin/service cups stop
        /sbin/service cups start
 fi
+%endif
 
 %postun libs
 /sbin/ldconfig
@@ -194,13 +220,13 @@ rm -rf $RPM_BUILD_ROOT
 /usr/bin/cancel
 /usr/bin/cupstestdsc
 /usr/bin/cupstestppd
-/usr/bin/ippfind
 /usr/bin/ipptool
 /usr/bin/lp*
 %dir /usr/lib/cups
 %dir /usr/lib/cups/backend
 %if %{?_with_dnssd:1}%{!?_with_dnssd:0}
 # DNS-SD
+/usr/bin/ippfind
 /usr/lib/cups/backend/dnssd
 %endif
 /usr/lib/cups/backend/http
@@ -306,7 +332,10 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/man/man1/cups.1.gz
 /usr/share/man/man1/cupstestdsc.1.gz
 /usr/share/man/man1/cupstestppd.1.gz
+%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
+# DNS-SD
 /usr/share/man/man1/ippfind.1.gz
+%endif
 /usr/share/man/man1/ipptool.1.gz
 /usr/share/man/man1/lp.1.gz
 /usr/share/man/man1/lpoptions.1.gz