Accepting request 95282 from home:elvigia:branches:Printing

- Update systemd patch to a newer version that uses 
  libsystemd-daemon instead of bundling sd-daemon wrappers.

- Add complete systemd support, the hardware stuff  
  is handled in builtin udev rules
  (see /lib/udev/rules.d/99-systemd.rules)
  * See also http://0pointer.de/blog/projects/socket-activation2.html

OBS-URL: https://build.opensuse.org/request/show/95282
OBS-URL: https://build.opensuse.org/package/show/Printing/cups?expand=0&rev=230
This commit is contained in:
2011-12-06 14:51:06 +00:00
committed by Git OBS Bridge
parent 7896b9daf5
commit d408977aee
3 changed files with 444 additions and 19 deletions

View File

@@ -16,14 +16,20 @@
#
Name: cups
BuildRequires: avahi-compat-mDNSResponder-devel dbus-1-devel gcc-c++
BuildRequires: krb5-devel libpng-devel libtiff-devel openldap2-devel
BuildRequires: openslp-devel openssl-devel pam-devel pkg-config tcpd-devel
BuildRequires: fdupes update-desktop-files
BuildRequires: fdupes pkgconfig update-desktop-files
# Have libtool as explicit buildrequirement to no longer depend
# on a "hidden" buildrequirement in the OBS project definition:
BuildRequires: libtool
%if 0%{?suse_version} > 1140
BuildRequires: systemd-devel
%{?systemd_requires}
%define have_systemd 1
%endif
PreReq: textutils, fileutils, sh-utils, /usr/sbin/groupadd
PreReq: %insserv_prereq
PreReq: %fillup_prereq
@@ -107,6 +113,7 @@ Patch103: cups-1.4-do_not_strip_recommended_from_PPDs.patch
# Patch104 adds the 'allowallforanybody' policy to cupsd.conf
# see https://fate.novell.com/303515
Patch104: cups-1.5-additional_policies.patch
Patch105: cups-0001-systemd-add-systemd-socket-activation-and-unit-files.patch
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -235,14 +242,15 @@ printer drivers for CUPS.
%patch103
# Patch104 adds the 'allowallforanybody' policy to cupsd.conf:
%patch104
%patch105 -p1
%build
# Disable SILENT run of make so that make runs verbose as usual:
sed -i -e 's/^\.SILENT:/# .SILENT:/' Makedefs.in
%{?suse_update_config:%{suse_update_config -f . }}
libtoolize --force
aclocal
autoconf
export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS -O2 -fno-strict-aliasing -fstack-protector"
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fstack-protector -DLDAP_DEPRECATED"
export CXX=g++
@@ -276,7 +284,11 @@ export CXX=g++
--with-python \
--with-cachedir=/var/cache/cups \
--with-pdftops=/usr/bin/pdftops \
%if 0%{?have_systemd}
--with-systemdsystemunitdir=%{_unitdir} \
%endif
--prefix=/
make %{?_smp_mflags} CXX=g++
%install
@@ -307,7 +319,7 @@ install -d -m755 $RPM_BUILD_ROOT%{_datadir}/cups/drivers
install -d -m755 $RPM_BUILD_ROOT/var/cache/cups
# Add conf/pam.suse regarding support for PAM (see Patch100: cups-pam.diff):
install -m 644 -D conf/pam.suse $RPM_BUILD_ROOT/etc/pam.d/cups
# Add missing usual documentation:
# Add missing usual documentation:
install -d -m755 $RPM_BUILD_ROOT/%{_defaultdocdir}/cups
for f in CHANGES*.txt CREDITS.txt INSTALL.txt LICENSE.txt README.txt
do install -m 644 "$f" $RPM_BUILD_ROOT%{_defaultdocdir}/cups/
@@ -346,34 +358,32 @@ mv $RPM_BUILD_ROOT/usr/share/locale/{zh,zh_CN}
%pre
/usr/sbin/groupadd -g 71 -o -r ntadmin 2>/dev/null || :
# exit successfully in any case:
exit 0
%if 0%{?have_systemd}
%service_add_pre cups.service cups.socket cups.path
%endif
%post
%{fillup_and_insserv -ny cups cups}
# exit successfully in any case:
exit 0
%if 0%{?have_systemd}
%service_add_post cups.service cups.socket cups.path
%endif
%preun
%stop_on_removal cups
# exit successfully in any case:
exit 0
%if 0%{?have_systemd}
%service_del_preun cups.service cups.socket cups.path
%endif
%postun
%restart_on_update cups
%{insserv_cleanup}
# exit successfully in any case:
exit 0
%if 0%{?have_systemd}
%service_del_postun cups.service cups.socket cups.path
%endif
%post libs
/sbin/ldconfig
# exit successfully in any case:
exit 0
%post libs -p /sbin/ldconfig
%postun libs
/sbin/ldconfig
# exit successfully in any case:
exit 0
%postun libs -p /sbin/ldconfig
%files
# The files sections list all mandatory files explicitely one by one.
@@ -486,6 +496,11 @@ exit 0
%doc %{_mandir}/man8/cupsfilter.8.gz
%{_datadir}/cups/
%exclude %{_datadir}/cups/ppdc/
%if 0%{?have_systemd}
%{_unitdir}/cups.path
%{_unitdir}/cups.service
%{_unitdir}/cups.socket
%endif
%files client
# Set explicite owner, group, and permissions for lppasswd