From b89b0531f7b53736804c3c1981f7e440d3eced2dd61fb11a32b3a49fe23c2a5e Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Fri, 20 Apr 2012 11:20:52 +0000 Subject: [PATCH] Accepting request 114829 from home:jsmeix:branches:graphics Use libusb1 via BuildRequires libusb-1_0-devel (instead of using libusb0 via libusb-compat). BuildIgnore ghostscript-x11 which is not needed and blows up the build system. Minor cleanups in the spec file. OBS-URL: https://build.opensuse.org/request/show/114829 OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=53 --- sane-backends.changes | 18 +++++ sane-backends.spec | 179 ++++++++++-------------------------------- 2 files changed, 61 insertions(+), 136 deletions(-) diff --git a/sane-backends.changes b/sane-backends.changes index b09cdd9..7b6b564 100644 --- a/sane-backends.changes +++ b/sane-backends.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Apr 20 12:24:49 CEST 2012 - jsmeix@suse.de + +- Configure --enable-libusb_1_0 plus BuildRequires libusb-1_0-devel + to use libusb1 (instead of using libusb0 via libusb-compat), + see https://bugzilla.novell.com/show_bug.cgi?id=559697#c7 + for the libusb versioning numbering. +- 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, + see the "Shared_libraries" section in + http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets +- BuildIgnore ghostscript-x11 because BuildRequires texlive-latex + is needed for sane.tex -> sane.dvi -> sane.ps but texlive-latex + requires texlive which requires ghostscript-x11 but the latter + is not needed and blows up the build system. +- Minor cleanups in the spec file. + ------------------------------------------------------------------- Tue Mar 20 15:44:31 UTC 2012 - jslaby@suse.de diff --git a/sane-backends.spec b/sane-backends.spec index 2c488ae..40285a4 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -18,17 +18,23 @@ Name: sane-backends BuildRequires: libgphoto2-devel -BuildRequires: libjpeg-devel -BuildRequires: libtool -BuildRequires: libusb-compat-devel -BuildRequires: net-snmp-devel -BuildRequires: pkg-config -BuildRequires: texlive-latex %if 0%{?suse_version} > 1130 BuildRequires: libieee1284-devel %else BuildRequires: libieee1284 %endif +BuildRequires: libjpeg-devel +BuildRequires: libtool +BuildRequires: libusb-1_0-devel +BuildRequires: net-snmp-devel +BuildRequires: pkg-config +# texlive-latex is needed to make doc/sane.ps from doc/sane.tex +# but texlive-latex requires texlive which requires ghostscript-x11 +# but ghostscript-x11 is not needed for sane.tex -> sane.dvi -> sane.ps +# so that the needless package ghostscript-x11 blows up the build system +# and is explicitly excluded to be installed in the build system: +BuildRequires: texlive-latex +#!BuildIgnore: ghostscript-x11 Summary: SANE (Scanner Access Now Easy) Scanner Drivers License: GPL-2.0 ; GPL-2.0+ ; LGPL-2.1+ ; SUSE-Public-Domain Group: Hardware/Scanner @@ -80,7 +86,7 @@ Source200: create_scanner_database Source201: create_sane-backends-autoconfig.rules # Patch1 does locale rename: no -> nb: # Patch1 is obsolete since sane-backends-1.0.19 because it uses 'nb'. -# Patch2 fixes too small arrays in backend/niash.c: +# Patch2 fix-buffer-overflow.patch fixes too small arrays in backend/niash.c: Patch2: fix-buffer-overflow.patch # Patch3 replaces fixed HZ compile-time value by sysconf(_SC_CLK_TCK) runtime value: # Patch3 is obsolete since sane-backends-1.0.19 because it is fixed in the source. @@ -93,17 +99,17 @@ Patch2: fix-buffer-overflow.patch # Patch7 lets sanei_scsi_find_devices continue on to look at subsequent devices # if the attach callback returns anything other than SANE_STATUS_GOOD: # Patch7 is obsolete since sane-backends-1.0.20 because it is fixed in the source. -# Patch8 re-adds SANE_CAP_ALWAYS_SETTABLE to sane.h which was erroneously -# removed in sane-backends-1.0.20 so that sane-frontends and xsane can no longer build, -# see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=527675 +# Patch8 re-add-SANE_CAP_ALWAYS_SETTABLE.patch re-adds SANE_CAP_ALWAYS_SETTABLE to sane.h +# which was erroneously removed in sane-backends-1.0.20 so that sane-frontends and xsane +# can no longer build, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=527675 # SANE_CAP_ALWAYS_SETTABLE is still missing in sane-backends-1.0.21 Patch8: re-add-SANE_CAP_ALWAYS_SETTABLE.patch # Patch9 fix-hp3900_config.c.patch fixes a possible for loop overflow in hp3900_config.c # see https://bugzilla.novell.com/show_bug.cgi?id=517281 # and https://alioth.debian.org/tracker/index.php?func=detail&aid=311856&group_id=30186&atid=410366 # which is obsolete since sane-backends-1.0.21 because it is fixed in the source. -# Patch10 fixes undefined 'foo = ++foo modulo bar' operations in mustek_pp_ccd300.c -# see https://bugzilla.novell.com/show_bug.cgi?id=498435 +# Patch10 fix-mustek_pp_ccd300.c.patch fixes undefined 'foo = ++foo modulo bar' operations +# in mustek_pp_ccd300.c see https://bugzilla.novell.com/show_bug.cgi?id=498435 # and https://alioth.debian.org/tracker/index.php?func=detail&aid=311857&group_id=30186&atid=410366 # where the upstream maintainer did not understand what is wrong and closed it as "Wont Fix" # so that we have to keep this patch: @@ -149,23 +155,23 @@ Patch10: fix-mustek_pp_ccd300.c.patch # The libtool script used in sane-backends is slightly modified to support that. # Patch102 was dropped because there is no reason to build them as libtool modules # and it would make our package incompatible with the rest of the SANE world. -# Patch103 installs tools/umax_pp as /usr/bin/umax_pp which is built +# Patch103 install-umax_pp-tool.patch installs tools/umax_pp as /usr/bin/umax_pp which is built # but not installed but it is needed to recover from a failed scan # with scanners which use the umax_pp backend, see http://bugs.debian.org/496833 Patch103: install-umax_pp-tool.patch -# Patch104 removes descriptions-external/hpoj.desc from doc/Makefile.am +# Patch104 no-descriptions-external-hpoj.patch removes descriptions-external/hpoj.desc from doc/Makefile.am # because it is intentionally removed from the sources in the prep section: Patch104: no-descriptions-external-hpoj.patch -# additional usb id -Patch105: sane-backends-1.0.21-SCX4500W.patch -# fix usb device support in xerox_mfp (bnc#745245) -Patch106: sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch # Patch105 sane-backends-1.0.20-xerox_mfp.diff backports post 1.0.20 xerox_mfp changes # and is therefore removed since sane-backends-1.0.21 which contains those changes. +# Patch106 sane-backends-1.0.21-SCX4500W.patch adds usb id for SCX4500W: +Patch106: sane-backends-1.0.21-SCX4500W.patch +# Patch107 sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch fixes usb device support in xerox_mfp (bnc#745245): +Patch107: sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch # Install into this non-root directory (required when norootforbuild is used): BuildRoot: %{_tmppath}/%{name}-%{version}-build -# The postinstall script requires this: -PreReq: coreutils, /bin/sed, /bin/grep +# Prerequire /sbin/ldconfig which is used in the traditional bash scriptlets for post/postun: +PreReq: /sbin/ldconfig # See https://bugzilla.novell.com/show_bug.cgi?id=437293 %ifarch ppc64 Obsoletes: sane-64bit @@ -193,108 +199,6 @@ The "saned" daemon provides the service "sane-port" to access scanners that are connected to a server via network from client hosts that run the "net" meta driver. - - -Authors: --------- - Abel Deuring - Andras Major - Andreas Beck - Andreas Bolsch - Andreas Czechanowski - Andreas Nowack - Andreas Rick - Andrew Kuchling - Bernd Schroeder - Bertrik Sikken - Brian J. Murrell - Chris Bagwell - Chris Pinkham - Christian Bucher - David Etherton - David F. Skoll - David Huggins-Daines - David Mosberger - David Stevenson - Didier Carlier - Earle F. Philhower III - Eddy De Greef - Eugene S. Weiss - Feico W. Dillema - Franck Schneider - Frank Zago - Frederik Ramm - Fred Odendaal - Gerard Klaver - Gerhard Jaeger - Giuseppe Sacco - Glenn Ramsey - Gordon Matzigkeit - Guido Muesch - Helmut Koeberle - Henning Geinitz - Henrik Johansson - Ilia Sotnikov - Ingo Schneider - Ingo Wilken - James Perry - Jeff Freedman - Jochen Eisinger - Jonathan Bravo Lopez - Jon Chambers - Juergen G. Schimmer - Julien Blache - Karl Anders Oygard - Karl Heinz Kremer - Karsten Festag - Kazuhiro Sasayama - Kazuya Fukuda - Kevin Charter - M. Allan Noah - Manuel Panea - Marcio Teixeira - Marian Eichholz - Markus Mertinat - Martijn van Oosterhout - Matthew Duggan - Matthew Marjanovic - Mattias Ellert - Max Vorobiev - Meino Christian Cramer - M.F. - Michael Herder - Michael K. Johnson - Michel Roelofs - Milon Firikis - Mitsuru Okaniwa - Nathan Rutman - Oliver Rauch - Oliver Schirrmeister - Oliver Schwartz - Patrick Lessard - Patrick Reynolds - Peter Fales - Peter Kirchgessner - Petter Reinholdtsen - Pierre Willenbrock - Randolph Bentson - Rene Rebe - Roger Wolff - Roy Zhou - Sebastien Sable - Sergey Vlasov - Simon Krix - Simon Munton - Stephane Voltz - Thomas Soumarmon - Tom Martone - Tom Wang - Tristan Tarrant - Troy Rollo - Ullrich Sigwanz - Ulrich Deiters - Wittawat Yamwong - %package devel Summary: Development files for sane-backends License: GPL-2.0 ; GPL-2.0+ ; LGPL-2.1+ ; SUSE-Public-Domain @@ -335,30 +239,26 @@ accidentally disabled when only one scanner was disconnected. If you do not like automated driver activation, do not install this package or remove it when it is already installed. - - -Authors: --------- - Johannes Meixner - %prep %setup -q # Apply upstream patches first of all: # Then apply non-upstream patches: -# Patch2 fixes too small arrays in backend/niash.c: +# Patch2 fix-buffer-overflow.patch fixes too small arrays in backend/niash.c: %patch2 -# Patch8 re-adds SANE_CAP_ALWAYS_SETTABLE to sane.h which was erroneously removed: +# Patch8 re-add-SANE_CAP_ALWAYS_SETTABLE.patch re-adds SANE_CAP_ALWAYS_SETTABLE to sane.h which was erroneously removed: %patch8 -# Patch10 fixes undefined 'foo = ++foo modulo bar' operations in mustek_pp_ccd300.c: +# Patch10 fix-mustek_pp_ccd300.c.patch fixes undefined 'foo = ++foo modulo bar' operations in mustek_pp_ccd300.c: %patch10 # Patch100... is SUSE specific stuff: -# Patch103 installs tools/umax_pp as /usr/bin/umax_pp: +# Patch103 install-umax_pp-tool.patch installs tools/umax_pp as /usr/bin/umax_pp: %patch103 -# Patch104 removes descriptions-external/hpoj.desc from doc/Makefile.am +# Patch104 no-descriptions-external-hpoj.patch removes descriptions-external/hpoj.desc from doc/Makefile.am # because it is intentionally removed from the sources in the prep section: %patch104 -%patch105 -p1 +# Patch106 sane-backends-1.0.21-SCX4500W.patch adds usb id for SCX4500W: %patch106 -p1 +# Patch107 sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch fixes usb device support in xerox_mfp (bnc#745245): +%patch107 -p1 # Source100... is SUSE specific stuff: # Remove hpoj.desc completely to avoid confusion with its successor hpaio.desc # because since openSUSE 10.3 the package hp-officeJet (for hpoj.desc) is dropped. @@ -398,6 +298,8 @@ export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DGIMP_ENABLE_COMPAT_CRUFT=1 -fno-st export LDFLAGS="-L/%_lib $LDFLAGS" # Enable pthread instead of fork (used in Debian since Feb 2009 and no issues so far), # see https://bugzilla.novell.com/show_bug.cgi?id=633780 +# Enable libusb-1.0 support which is available since sane-backends 1.0.20 +# and libusb-1_0 is available at least since openSUSE 11.1. # Disable locking because /var/lock/sane/ would be a world-writable directory. ./configure --prefix=/usr \ --exec-prefix=/usr \ @@ -409,6 +311,7 @@ export LDFLAGS="-L/%_lib $LDFLAGS" --with-gphoto2 \ --with-docdir=%{_defaultdocdir}/sane-backends \ --enable-pthread \ + --enable-libusb_1_0 \ --disable-locking # Enable locking for backends where "99" is the group of the lockfile path (LOCKPATH_GROUP) # because "99" is the group of the user who runs the build when norootforbuild is used @@ -606,9 +509,13 @@ install -m644 %{SOURCE102} %{buildroot}%{_sysconfdir}/slp.reg.d rm %{buildroot}%{_defaultdocdir}/sane-backends/{README.os2,README.aix,README.solaris} %find_lang sane-backends -%post -p /sbin/ldconfig +%post +/sbin/ldconfig +exit 0 -%postun -p /sbin/ldconfig +%postun +/sbin/ldconfig +exit 0 %files -f sane-backends.lang %defattr(-,root,root)