summaryrefslogtreecommitdiff
path: root/packaging/cups.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/cups.spec')
-rw-r--r--packaging/cups.spec42
1 files changed, 36 insertions, 6 deletions
diff --git a/packaging/cups.spec b/packaging/cups.spec
index 76fd06b..9545e0b 100644
--- a/packaging/cups.spec
+++ b/packaging/cups.spec
@@ -26,8 +26,8 @@
%{!?_with_dbus: %define _dbus --disable-dbus}
%{!?_with_dnssd: %{!?_without_dnssd: %define _with_dnssd --with-dnssd}}
-%{?_with_dnssd: %define _dnssd --enable-dnssd}
-%{!?_with_dnssd: %define _dnssd --disable-dnssd}
+%{?_with_dnssd: %define _dnssd --enable-avahi}
+%{!?_with_dnssd: %define _dnssd --disable-avahi}
%{!?_with_libusb1: %{!?_without_libusb1: %define _with_libusb1 --with-libusb1}}
%{?_with_libusb1: %define _libusb1 --enable-libusb}
@@ -43,12 +43,12 @@
Summary: CUPS
Name: cups
-Version: 2.2.3
+Version: 2.2.4
Release: 0
Epoch: 1
License: GPL
Group: System Environment/Daemons
-Source: https://github.com/apple/cups/releases/download/v2.2.3/cups-2.2.3-source.tar.gz
+Source: https://github.com/apple/cups/releases/download/v2.2.4/cups-2.2.4-source.tar.gz
Url: http://www.cups.org
Packager: Anonymous <anonymous@example.com>
Vendor: Example Corp
@@ -116,7 +116,7 @@ This package provides LPD client support.
%build
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
- ./configure %{_dbus} %{_dnssd} %{_libusb1} %{_static}
+ ./configure %{_dbus} %{_dnssd} %{_libusb1} %{_static} %{_systemd}
# If we got this far, all prerequisite libraries must be here.
make
@@ -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
@@ -377,6 +406,7 @@ rm -rf $RPM_BUILD_ROOT
%dir /usr/share/doc/cups/help
/usr/share/doc/cups/help/api*.html
+/usr/share/doc/cups/help/cupspm.html
/usr/share/doc/cups/help/postscript-driver.html
/usr/share/doc/cups/help/ppd-compiler.html
/usr/share/doc/cups/help/raster-driver.html