- In cups.spec remove the Obsoletes/Provides cups-SUSE-ppds-dat

because cups-SUSE-ppds-dat.rpm existed only up to SLE10
  but it does no longer exist since 11.1/SLE11
  and CUPS 1.5.x is not provided for SLE10.
- Use traditional bash scriptlets for post/postun with
  an explicite "exit 0" line at the end to be fail safe and
  therefore also "PreReq: /sbin/ldconfig" explicitly for the
  cups-libs sub-package, see the "Shared_libraries" section in
  http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets

OBS-URL: https://build.opensuse.org/package/show/Printing/cups?expand=0&rev=238
This commit is contained in:
Johannes Meixner 2012-04-10 14:31:33 +00:00 committed by Git OBS Bridge
parent 543acced9f
commit 0e2538a703
2 changed files with 33 additions and 12 deletions

View File

@ -1,10 +1,19 @@
-------------------------------------------------------------------
Tue Apr 10 15:52:00 CEST 2012 - jsmeix@suse.de
Tue Apr 10 16:25:24 CEST 2012 - jsmeix@suse.de
- In cups.spec only "Requires: ghostscript" but no longer require
ghostscript-fonts-std in cups.spec because in ghostscript.spec
there is already "Requires: ghostscript-fonts-std"
(related to openSUSE Bugzilla bnc#735824).
- In cups.spec remove the Obsoletes/Provides cups-SUSE-ppds-dat
because cups-SUSE-ppds-dat.rpm existed only up to SLE10
but it does no longer exist since 11.1/SLE11
and CUPS 1.5.x is not provided for SLE10.
- Use traditional bash scriptlets for post/postun with
an explicite "exit 0" line at the end to be fail safe and
therefore also "PreReq: /sbin/ldconfig" explicitly for the
cups-libs sub-package, see the "Shared_libraries" section in
http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
-------------------------------------------------------------------
Tue Feb 7 14:42:59 CET 2012 - jsmeix@suse.de

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cups
BuildRequires: avahi-compat-mDNSResponder-devel
BuildRequires: dbus-1-devel
@ -40,13 +41,16 @@ BuildRequires: systemd-devel
%{?systemd_requires}
%define have_systemd 1
%endif
PreReq: textutils, fileutils, sh-utils, /usr/sbin/groupadd
PreReq: %insserv_prereq
PreReq: %fillup_prereq
# sysvinit(syslog) is first provided in openSUSE:Factory (i.e. openSUSE 11.4):
%if 0%{?suse_version} > 1130
PreReq: sysvinit(syslog)
%endif
PreReq: /usr/sbin/groupadd
PreReq: fileutils
PreReq: sh-utils
PreReq: textutils
Url: http://www.cups.org/
Summary: The Common UNIX Printing System
License: GPL-2.0+ ; LGPL-2.1+
@ -84,11 +88,9 @@ Requires: /usr/bin/pdftops
Recommends: foomatic-filters
# Conflicts with other print spoolers which provide same binaries like /usr/bin/lp and so on
# or which may listen on the same port (e.g. cups-lpd versus traditional lpd on port 515):
Conflicts: plp lprold lprng
# Our cups-SUSE-ppds-dat.rpm exist at least from SLE9 up to SLE10
# but it does no longer exist at least since 11.1/SLE11:
Obsoletes: cups-SUSE-ppds-dat
Provides: cups-SUSE-ppds-dat
Conflicts: lprng
Conflicts: lprold
Conflicts: plp
# Patch0...Patch9 is for patches from upstream:
# Source10...Source99 is for sources from Novell/openSUSE which are intended for upstream:
# Patch10...Patch99 is for patches from Novell/openSUSE which are intended for upstream:
@ -142,6 +144,8 @@ See http://www.cups.org
Summary: Libraries for CUPS
License: GPL-2.0+ ; LGPL-2.1+
Group: Hardware/Printing
# Prerequire /sbin/ldconfig which is used in the traditional bash scriptlets for post/postun:
PreReq: /sbin/ldconfig
# https://bugzilla.novell.com/show_bug.cgi?id=437293
%ifarch ppc64
Obsoletes: cups-libs-64bit
@ -162,7 +166,9 @@ Summary: CUPS Client Programs
License: GPL-2.0+
Group: Hardware/Printing
# Conflicts with other print spoolers which provide same binaries like /usr/bin/lp and so on:
Conflicts: plp lprold lprng
Conflicts: lprng
Conflicts: lprold
Conflicts: plp
# Require the exact matching version-release of the cups-libs sub-package because
# non-matching CUPS libraries may let CUPS software crash (e.g. segfault)
# because all CUPS software is built from the one same CUPS source tar ball
@ -265,7 +271,6 @@ sed -i -e 's/^\.SILENT:/# .SILENT:/' Makedefs.in
libtoolize --force
aclocal
autoconf
export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS -O2 -fstack-protector"
export CFLAGS="$RPM_OPT_FLAGS -fstack-protector -DLDAP_DEPRECATED"
export CXX=g++
@ -303,7 +308,6 @@ export CXX=g++
--with-systemdsystemunitdir=%{_unitdir} \
%endif
--prefix=/
make %{?_smp_mflags} CXX=g++
%install
@ -376,18 +380,21 @@ mv $RPM_BUILD_ROOT/usr/share/locale/{zh,zh_CN}
%if 0%{?have_systemd}
%service_add_pre cups.service cups.socket cups.path
%endif
exit 0
%post
%{fillup_and_insserv -ny cups cups}
%if 0%{?have_systemd}
%service_add_post cups.service cups.socket cups.path
%endif
exit 0
%preun
%stop_on_removal cups
%if 0%{?have_systemd}
%service_del_preun cups.service cups.socket cups.path
%endif
exit 0
%postun
%restart_on_update cups
@ -395,10 +402,15 @@ mv $RPM_BUILD_ROOT/usr/share/locale/{zh,zh_CN}
%if 0%{?have_systemd}
%service_del_postun cups.service cups.socket cups.path
%endif
exit 0
%post libs -p /sbin/ldconfig
%post libs
/sbin/ldconfig
exit 0
%postun libs -p /sbin/ldconfig
%postun libs
/sbin/ldconfig
exit 0
%files
# The files sections list all mandatory files explicitly one by one.