# --with/--without options: # gphoto2: support gphoto2 backend # gphoto2_split: ship gphoto2 backend in separate subpackage # libs_split: ship libraries in separate subpackage # docs_split: ship documentation in separate subpackage # programs_split: ship programs in separate subpackage %define gphoto2_support 0%{!?_without_gphoto2:1} %define gphoto2_split 0%{!?_without_gphoto2:%{?_with_gphoto2_split:1}} %if 0%{?fedora} >= 6 || 0%{?redhat} >= 5 %define libs_split 0%{?!_without_libs_split:1} %define docs_split 0%{?_with_docs_split:1} %define programs_split 0%{?_with_programs_split:1} %else %define libs_split 0%{?_with_libs_split:1} %define docs_split 0%{?!_without_docs_split:1} %define programs_split 0%{?!_without_programs_split:1} %endif Summary: Scanner access software Name: sane-backends Version: 1.0.18 Release: 1%{?dist} License: GPL (programs), relaxed LGPL (libraries), and public domain (docs) Group: System Environment/Libraries Source0: ftp://ftp.sane-project.org/pub/sane/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: sane.png Patch1: sane-backends-1.0.11-rpath.patch Patch2: sane-backends-1.0.12-badcode.patch Patch3: sane-backends-multilib.patch Patch4: sane-backends-1.0.17-newmodels.patch Patch5: sane-backends-1.0.17-pkgconfig.patch URL: http://www.sane-project.org BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%__id_u -n) BuildRequires: tetex-latex libusb-devel libieee1284-devel libjpeg-devel BuildRequires: autoconf libtool BuildRequires: gettext %if %{gphoto2_support} BuildRequires: gphoto2-devel %endif Requires: pam >= 0.78-2 Requires: udev Requires: libsane-hpaio %if 0%{?fedora} >= 5 || 0%{?redhat} >= 5 %if ! %{docs_split} Obsoletes: sane-backends-docs <= 1.0.17-12 Provides: sane-backends-docs = %{?epoch:%{epoch}:}%{version}-%{release} %endif %endif ExcludeArch: s390 s390x %description Scanner Access Now Easy (SANE) is a universal scanner interface. The SANE application programming interface (API) provides standardized access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video and still cameras, frame-grabbers, etc.). %package devel Summary: SANE development toolkit Group: Development/Libraries Requires: sane-backends = %{version}, libusb-devel, libieee1284-devel Requires: pkgconfig %if %{gphoto2_support} Requires: gphoto2-devel %endif Obsoletes: sane-devel Provides: sane-devel %description devel This package contains static libraries and header files for writing Scanner Access Now Easy (SANE) modules. %if %{docs_split} %package docs Summary: Additional documentation for SANE Group: Documentation %description docs Additional documentation for SANE, a universal scanner interface. %endif %if %{libs_split} %package libs Summary: SANE libraries Group: System Environment/Libraries Requires: sane-backends = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: sane-backends <= 1.0.17-12 %description libs This package contains the SANE libraries which are needed by applications that want to access scanners. %if %{gphoto2_split} %package libs-gphoto2 Summary: SANE libraries for gphoto2 Group: System Environment/Libraries Requires: sane-backends-libs = %{?epoch:%{epoch}:}%{version}-%{release} %description libs-gphoto2 This package contains the SANE libraries which are needed by applications that want to access digital cameras. %endif %endif %if %{programs_split} %package programs Summary: SANE programs Group: Applications/Multimedia %description programs This package contains SANE Utilities and the SANE daemon needed for scanning over a network. %endif %prep %setup -q %patch1 -p1 -b .rpath %patch2 -p1 -b .badcode %patch3 -p1 -b .multilib %patch4 -p1 -b .newmodels %patch5 -p1 -b .pkgconfig # Fix bug #62847. perl -pi -e 's,/dev/usbscanner0?,/dev/usb/scanner0,' backend/*.conf for i in agfafocus avision coolscan2 umax_pp; do iconv -f iso-8859-1 -t utf-8 < "doc/sane-$i.man" > "doc/sane-$i.man_" mv "doc/sane-$i.man_" "doc/sane-$i.man" done # We patched configure.in, so regenerate configure. sed '/^# libtool\.m4/,$d' < acinclude.m4 > acinclude.m4.new mv -f acinclude.m4{.new,} libtoolize --force --copy aclocal autoconf %build %{expand:%%define optflags %{optflags} -DGIMP_ENABLE_COMPAT_CRUFT=1} %if %{gphoto2_support} %configure --with-gphoto2=%{_prefix} --with-docdir=%{_docdir}/%{name}-%{version} %else %configure --without-gphoto2 --with-docdir=%{_docdir}/%{name}-%{version} %endif make %install rm -rf %{buildroot} %{makeinstall} docdir=%{buildroot}/%{_docdir}/%{name}-%{version} mkdir -p %{buildroot}%{_datadir}/pixmaps install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps rm -f %{buildroot}%{_bindir}/gamma4scanimage rm -f %{buildroot}%{_mandir}/man1/gamma4scanimage.1* rm -f %{buildroot}%{_libdir}/sane/*.a %{buildroot}%{_libdir}/*.a rm -f %{buildroot}%{_libdir}/libsane*.la %{buildroot}%{_libdir}/sane/*.la mkdir -p %{buildroot}/%{_sysconfdir}/udev/rules.d/ sh tools/udev/convert-usermap.sh tools/hotplug/libsane.usermap sed 's|MODE="660", GROUP="scanner"|SYMLINK+="scanner-%k"|g' libsane.rules > %{buildroot}/%{_sysconfdir}/udev/rules.d/60-libsane.rules %find_lang %name %clean rm -rf %{buildroot} %if %{libs_split} %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %else %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %endif %files -f %{name}.lang %defattr(-,root,root) %dir /etc/sane.d %config(noreplace) /etc/sane.d/* %{_sysconfdir}/udev/rules.d/* %{_mandir}/*/* %{_datadir}/pixmaps/sane.png %if ! %{libs_split} %{_libdir}/libsane*.so.* %dir %{_libdir}/sane %{_libdir}/sane/*.so.* %endif %if %{docs_split} %{_docdir}/* %exclude %{_docdir}/%{name}-%{version}/sane-backends.html %exclude %{_docdir}/%{name}-%{version}/sane-backends-external.html %exclude %{_docdir}/%{name}-%{version}/sane-mfgs.html %exclude %{_docdir}/%{name}-%{version}/sane-mfgs-external.html %exclude %{_docdir}/%{name}-%{version}/sane.dvi %exclude %{_docdir}/%{name}-%{version}/sane.ps %else %doc %{_docdir}/* %endif %if %{programs_split} %exclude %{_mandir}/man1/* %exclude %{_mandir}/man8/* %files programs %defattr(-, root, root) %{_mandir}/man1/sane-find-scanner.1* %{_mandir}/man1/scanimage.1* %{_mandir}/man8/saned.8* %endif %{_bindir}/sane-find-scanner %{_bindir}/scanimage %{_sbindir}/* %if %{docs_split} %files docs %defattr(-, root, root) %{_docdir}/%{name}-%{version}/sane-backends.html %{_docdir}/%{name}-%{version}/sane-backends-external.html %{_docdir}/%{name}-%{version}/sane-mfgs.html %{_docdir}/%{name}-%{version}/sane-mfgs-external.html %{_docdir}/%{name}-%{version}/sane.dvi %{_docdir}/%{name}-%{version}/sane.ps %endif %files devel %defattr(-,root,root) %{_bindir}/sane-config %{_mandir}/man1/sane-config.1* %{_includedir}/sane %{_libdir}/libsane*.so %{_libdir}/sane/*.so %dir %{_libdir}/pkgconfig %{_libdir}/pkgconfig/sane-backends.pc %if %{libs_split} %files libs %defattr(-, root, root) %{_libdir}/libsane*.so.* %dir %{_libdir}/sane %{_libdir}/sane/*.so.* %if %{gphoto2_split} %exclude %{_libdir}/sane/*gphoto2.so.* %files libs-gphoto2 %defattr(-, root, root) %{_libdir}/sane/*gphoto2.so.* %endif %endif %changelog * Mon Jul 24 2006 Nils Philippsen - 1.0.18-1 - version 1.0.18 - unify spec file between OS releases * Wed Jul 12 2006 Jesse Keating - 1.0.17-13.1 - rebuild * Fri Jun 09 2006 Nils Philippsen 1.0.17-13 - split package into sane-backends, -devel, -libs, -programs to work around multilib issues (#135172) * Wed Jun 07 2006 Nils Philippsen 1.0.17-12 - require libsane-hpaio to work around #165751 * Tue Jun 06 2006 Nils Philippsen 1.0.17-11 - add BuildRequires: gettext (#194163) * Wed May 17 2006 Nils Philippsen 1.0.17-10 - add pkg-config support, re-write sane-config to use pkg-config to avoid multilib problems with conflicting sane-config scripts * Tue Apr 25 2006 Nils Philippsen 1.0.17-9 - add support for Canon Lide 60 scanner (#189726) * Wed Apr 05 2006 Nils Philippsen 1.0.17-8 - don't use automake * Tue Apr 04 2006 Nils Philippsen - require gphoto2-devel in sane-backends-devel * Fri Mar 24 2006 Nils Philippsen 1.0.17-7 - don't include *.la files * Thu Mar 23 2006 Than Ngo 1.0.17-6 - rebuild against gphoto2 to get rid of gphoto2.la * Tue Mar 14 2006 Nils Philippsen - 1.0.17-5 - buildrequire automake, autoconf, libtool (#178596) - don't require /sbin/ldconfig, /bin/mktemp, /bin/grep, /bin/cat, /bin/rm * Thu Feb 22 2006 Nils Philippsen - 1.0.17-4 - split off generated documentation into separate subpackage to avoid conflicts on multilib systems * Fri Feb 10 2006 Jesse Keating - 1.0.17-3.2 - bump again for double-long bug on ppc(64) * Tue Feb 07 2006 Jesse Keating - 1.0.17-3.1 - rebuilt for new gcc4.1 snapshot and glibc changes * Wed Jan 25 2006 Bill Nottingham 1.0.17-3 - ship udev rules for device creation (#177650). Require udev * Sun Jan 22 2006 Bill Nottingham 1.0.17-2 - disable hotplug dep. More later pending (#177650) * Tue Dec 20 2005 Nils Philippsen 1.0.17-1 - version 1.0.17 - reenable gphoto2 backend * Fri Dec 09 2005 Jesse Keating - rebuilt * Sat Oct 15 2005 Florian La Roche - rebuild * Fri Aug 19 2005 Nils Philippsen 1.0.16-1 - version 1.0.16 - remove obsolete docdir patch * Mon Jul 25 2005 Tim Waugh - Fixed libusbscanner comment (bug #162983). * Wed Mar 2 2005 Tim Waugh 1.0.15-9 - Rebuild for new GCC. * Fri Dec 10 2004 Tim Waugh 1.0.15-8 - Further small fixes to libusbscanner script. * Fri Dec 3 2004 Tim Waugh - Ship the correct libsane.usermap (part of bug #135802). * Wed Dec 1 2004 Tim Waugh - No longer need ep2400 patch. * Tue Nov 30 2004 Tim Waugh 1.0.15-7 - Updated libusbscanner script from Tomas Mraz, to use pam_console_apply. - Requires pam >= 0.78-2 for targetted pam_console_apply. * Thu Nov 25 2004 Tim Waugh 1.0.15-6 - Random changes in libusbscanner. * Tue Nov 23 2004 Tim Waugh 1.0.15-5 - libusbscanner: Create /dev/usb if it doesn't exist after 30s. * Mon Nov 22 2004 Tim Waugh 1.0.15-4 - Attempt to be more useful in libusbscanner by waiting a maximum of 30 seconds. - Add a chcon call to libusbscanner (bug #140059). Based on contribution from W. Michael Petullo. * Sat Nov 20 2004 Miloslav Trmac - 1.0.15-3 - Convert man pages to UTF-8 * Tue Nov 16 2004 Tim Waugh - Require hotplug's remover to work. * Tue Nov 16 2004 Tim Waugh 1.0.15-2 - Applied the libusbscanner part of the patch for bug #121511, by Ian Pilcher. * Mon Nov 8 2004 Tim Waugh 1.0.15-1 - 1.0.15. * Sun Oct 10 2004 Tim Waugh 1.0.14-6 - Make man pages identical on multilib installations. * Thu Oct 7 2004 Tim Waugh 1.0.14-5 - Build requires libjpeg-devel (bug #134964). * Thu Aug 26 2004 Tim Waugh 1.0.14-4 - Apply patch from David Zeuthen to fix hotplug script (bug #130755). * Mon Aug 9 2004 Tim Waugh 1.0.14-3 - Mark config files noreplace. * Tue Jun 15 2004 Elliot Lee - rebuilt * Wed Jun 2 2004 Tim Waugh 1.0.14-1 - 1.0.14. * Wed May 12 2004 Tim Waugh - s/ftp.mostang.com/ftp.sane-project.org/. * Fri May 7 2004 Tim Waugh 1.0.13-7 - Fix epson.conf for USB scanners (bug #122328). * Tue May 4 2004 Tim Waugh 1.0.13-6 - Ship libusb.usermap (from sane-backends-1.0.14) and a pam_console-aware libusbscanner script. - Fix epson.conf for Epson Perfection 2400 (bug #122328). * Tue Mar 02 2004 Elliot Lee - rebuilt * Fri Feb 13 2004 Elliot Lee - rebuilt * Thu Feb 5 2004 Tim Waugh 1.0.13-4 - Fixed compilation with GCC 3.4. * Mon Dec 15 2003 Tim Waugh 1.0.13-3 - Take %%{_libdir}/sane out of ldconfig's search path altogether (Oliver Rauch). * Tue Nov 25 2003 Thomas Woerner 1.0.13-2 - no rpath in sane-config anymore * Sun Nov 23 2003 Tim Waugh 1.0.13-1 - 1.0.13. - No longer need autoload, gt68xx patches. * Thu Nov 20 2003 Tim Waugh 1.0.12-6 - Don't add %%{_libdir}/sane to ld.so.conf (bug #110419). * Tue Nov 11 2003 Tim Waugh 1.0.12-5 - Updated gt68xx driver to fix timeout problems. * Wed Oct 8 2003 Tim Waugh - Avoided undefined behaviour in canon-sane.c (bug #106305). * Mon Sep 29 2003 Tim Waugh - Updated URL. * Thu Jul 24 2003 Tim Waugh 1.0.12-4 - The devel package requires libieee1284-devel. * Mon Jun 16 2003 Tim Waugh 1.0.12-3 - Use libtoolize and aclocal to fix build. - Build requires libieee1284-devel (to fix bug #75849). * Wed Jun 04 2003 Elliot Lee - rebuilt * Sun May 25 2003 Tim Waugh 1.0.12-1 - 1.0.12. * Thu Mar 20 2003 Tim Waugh 1.0.11-1 - Shipped libtool is broken; use installed script instead. - Remove files not shipped. - Fix some /usr/lib references. - 1.0.11. - Drop sane-sparc, errorchk, hp101, security patches. - Update rpath, docdir patches. - Use %%find_lang. * Fri Mar 7 2003 Tim Waugh - sane-backends-devel requires libusb-devel (bug #85742). * Mon Feb 10 2003 Tim Waugh 1.0.9-5 - Fix saned problems. * Wed Jan 22 2003 Tim Powers 1.0.9-4 - rebuilt * Thu Jan 16 2003 Tim Waugh 1.0.9-3 - hp-backend 1.01 for 'error during device I/O' workaround (bug #81835). * Thu Jan 9 2003 Tim Waugh 1.0.9-2 - Better error checking in the Canon backend (bug #81332). * Fri Oct 25 2002 Tim Waugh 1.0.9-1 - 1.0.9. * Wed Oct 23 2002 Tim Waugh 1.0.8-6 - Ship the installed documentation. - Move sane-config to the devel subpackage (bug #68454). * Fri Jun 21 2002 Tim Powers - automated rebuild * Fri Jun 21 2002 Tim Waugh 1.0.8-4 - Fix bug #62847. * Tue Jun 18 2002 Tim Waugh 1.0.8-3 - Fix dangling symlink (bug #66672). * Wed Jun 12 2002 Tim Waugh 1.0.8-2 - Don't tell SANE applications to use rpath (bug #66129, bug #66132). * Mon May 27 2002 Tim Waugh 1.0.8-1 - 1.0.8. * Wed May 22 2002 Tim Waugh 1.0.8-0.20020522.1 - Update to CVS. Release expected before the end of the month. - No longer need defaultincl or argv patches. * Wed May 15 2002 Tim Waugh 1.0.7-7 - Unconditionally run ldconfig after installation (bug #64964). * Mon Mar 4 2002 Tim Waugh 1.0.7-6 - Re-apply the original 1.0.7-4 fix (oops): - Make sure to load SCSI modules if not already loaded (bug #59979). * Mon Mar 4 2002 Tim Powers 1.0.7-5 - bump release number, wasn't bumped last time * Mon Mar 3 2002 Tim Waugh 1.0.7-4 - Update sparc patch (Tom "spot" Callaway). * Thu Feb 21 2002 Tim Waugh 1.0.7-3 - Rebuild in new environment. - Disable bad stdarg code in scanimage so that alpha builds succeed. * Mon Feb 11 2002 Tim Waugh 1.0.7-2 - Make sure sane-config doesn't specify the default include path (bug #59507). * Mon Feb 4 2002 Tim Waugh 1.0.7-1 - 1.0.7. * Sun Jan 27 2002 Tim Waugh 1.0.7-0.beta2.1 - 1.0.7-beta2. * Wed Jan 23 2002 Tim Waugh 1.0.7-0.beta1.1 - 1.0.7-beta1. - Patches no longer needed: scsi, microtek2, format. * Wed Jan 09 2002 Tim Powers 1.0.6-4 - automated rebuild * Wed Nov 21 2001 Tim Waugh 1.0.6-3 - Fix default file names format in batch scans (bug #56542). * Tue Nov 20 2001 Tim Waugh 1.0.6-2 - Apply Maurice Hilarius's patch to avoid kill(-1,SIGTERM) (bug #56540). * Mon Nov 5 2001 Tim Waugh 1.0.6-1 - 1.0.6. * Fri Jul 20 2001 Florian La Roche 1.0.5-4 - exclude s390, s390x * Tue Jul 17 2001 Preston Brown 1.0.5-3 - sane.png included * Tue Jul 10 2001 Tim Waugh 1.0.5-2 - sane-backends-devel provides sane-devel. * Sun Jul 1 2001 Tim Waugh 1.0.5-1 - 1.0.5. * Wed Jun 20 2001 Tim Waugh 1.0.5-0.20010620.0 - 2001-06-20 CVS update. PreReq /bin/cat, /bin/rm. * Mon Jun 11 2001 Tim Waugh 1.0.5-0.20010610 - 2001-06-10 CVS snapshot. umax_pp update from CVS again to fix more build problems. * Sun Jun 3 2001 Tim Waugh 1.0.5-0.20010603.1000 - 2001-06-03 CVS snapshot (10:00). Fixes umax_pp build problems. * Sat Jun 2 2001 Tim Waugh 1.0.5-0.20010530 - sane-backends (sane-frontends is in a separate package now). - 2001-05-30 CVS snapshot. - include.patch no longer needed. - sg3timeout.patch no longer needed. * Mon Jan 22 2001 Bernhard Rosenkraenzer 1.0.3-10 - Fix up the libtool config file /usr/lib/libsane.la kscan should build now. ;) * Wed Jan 10 2001 Tim Waugh - Increase timeout for SCSI commands sent via sg driver version 3 (bug #23447) * Mon Dec 25 2000 Matt Wilson - rebuilt against gimp 1.2.0 * Thu Dec 21 2000 Matt Wilson - rebuilt against gimp 1.1.32 - use -DGIMP_ENABLE_COMPAT_CRUFT=1 to build with compat macros * Mon Dec 18 2000 Matt Wilson - rebuilt against gimp 1.1.30 * Fri Dec 1 2000 Tim Waugh - Rebuild because of fileutils bug. * Thu Oct 26 2000 Bill Nottingham - fix provides for ia64/sparc64 * Thu Aug 29 2000 Trond Eivind Glomsrød - don't include xscanimage desktop entry - it's a gimp plugin. Doh. (part of #17076) - add tetex-latex as a build requirement * Wed Aug 23 2000 Matt Wilson - built against gimp 1.1.25 * Tue Aug 22 2000 Preston Brown - 1.0.3 bugfix release (#16726) - rev patch removed, no longer needed * Tue Aug 15 2000 Than Ngo - add triggerpostun to fix removing path from ld.so.conf at update * Fri Aug 4 2000 Bernhard Rosenkraenzer - Add Swedish and German translations to desktop file, Bug #15317 * Sun Jul 23 2000 Nalin Dahyabhai - use mktemp in post and postun scripts - fix incorrect usage of rev in backend/Makefile * Wed Jul 19 2000 Trond Eivind Glomsrød - workarounds for weird bug (all so-files had names with "s=" - except for sparc which has just "=" and IA64 which works) * Wed Jul 12 2000 Prospector - automatic rebuild * Mon Jul 3 2000 Matt Wilson - rebuilt against gimp-1.1.24 * Tue Jun 13 2000 Preston Brown - FHS paths - work around ICE on intel. FIX ME! * Mon May 22 2000 Tim Powers - rebuilt w/ glibc-2.1.90 * Thu May 18 2000 Tim Powers - updated to 1.0.2 * Wed Jul 21 1999 Tim Powers - rebuilt for 6.1 * Tue May 11 1999 Bill Nottingham - make it play nice with xsane, add ld.so.conf entries * Wed Apr 21 1999 Bill Nottingham - update to 1.0.1 * Tue Oct 13 1998 Michael Maher - updated package * Thu May 21 1998 Cristian Gafton - upgraded to 0.73 * Tue Jan 27 1998 Otto Hammersmith - umax drivers were missing from the file list. * Sun Dec 7 1997 Otto Hammersmith - added wmconfig - fixed library problem * Tue Dec 2 1997 Otto Hammersmith - added changelog - got newer package from Sane web site than our old powertools one