diff --git a/sane-backends.spec b/sane-backends.spec index 609e2c7..7cc8be4 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -1,10 +1,13 @@ # Disable gphoto2 backend by using "--without gphoto2" %define gphoto2_support 0%{!?_without_gphoto2:1} +# Enable splitting out gphoto2 backends by using "--with gphoto2_split" +%define gphoto2_split 0%{!?_without_gphoto2:%{?_with_gphoto2_split:1}} + Summary: Scanner access software Name: sane-backends Version: 1.0.17 -Release: 12 +Release: 13 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 @@ -25,27 +28,18 @@ BuildRequires: gphoto2-devel Requires: pam >= 0.78-2 Requires: udev Requires: libsane-hpaio +Obsoletes: sane-backends-docs <= 1.0.17-12 +Provides: sane-backends-docs 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.). If -they're using SANE, developers can write image-processing applications -without having to think about the peculiarities of individual devices. -SANE also makes it possible to write a device driver once, which can -then be used by any SANE-compliant application. SANE currently -includes drivers for some Epson SCSI scanners, HP ScanJet SCSI -scanners, Microtek SCSI scanners, Mustek SCSI flatbed scanners, PINT -devices, most UMAX SCSI scanners, Connectix QuickCam, and other SANE -devices via network. Note that this package does not enable network -scanning by default. If you wish to enable network scanning, read the -saned(1) manpage. If you'd like to develop SANE modules, you should -also install the sane-backends-devel package. +hand-held scanner, video and still cameras, frame-grabbers, etc.). %package devel -Summary: The SANE (a universal scanner interface) development toolkit. +Summary: SANE development toolkit Group: Development/Libraries Requires: sane-backends = %{version}, libusb-devel, libieee1284-devel Requires: pkgconfig @@ -56,16 +50,37 @@ Obsoletes: sane-devel Provides: sane-devel %description devel -Static libraries and header files for writing Scanner Access Now Easy -(SANE) modules. SANE is a universal scanner interface which is -included in the sane-backends package. +This package contains static libraries and header files for writing Scanner +Access Now Easy (SANE) modules. -%package docs -Summary: Additional documentation for SANE -Group: Documentation +%package libs +Summary: SANE libraries +Group: System Environment/Libraries +Requires: sane-backends = %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: sane-backends <= 1.0.17-12 -%description docs -Additional documentation for SANE, a universal scanner interface. +%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 + +%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. %prep %setup -q @@ -108,6 +123,7 @@ rm -rf %{buildroot} 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/ @@ -118,53 +134,62 @@ sed 's|MODE="660", GROUP="scanner"|SYMLINK+="scanner-%k"|g' libsane.rules > %{bu %find_lang %name + %clean rm -rf %{buildroot} -%post -p /sbin/ldconfig +%post libs -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root) %dir /etc/sane.d %config(noreplace) /etc/sane.d/* %{_sysconfdir}/udev/rules.d/* -%{_bindir}/sane-find-scanner -%{_bindir}/scanimage -%{_sbindir}/* -%{_libdir}/libsane*.so.* -%dir %{_libdir}/sane -%{_libdir}/sane/*.so.* %{_mandir}/*/* +%exclude %{_mandir}/man1/* +%exclude %{_mandir}/man8/* %{_datadir}/pixmaps/sane.png -%{_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 +%doc %{_docdir}/* %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 -%files docs +%files libs %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 +%{_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 + +%files programs +%defattr(-, root, root) +%{_bindir}/sane-find-scanner +%{_bindir}/scanimage +%{_mandir}/man1/sane-find-scanner.1* +%{_mandir}/man1/scanimage.1* +%{_sbindir}/* +%{_mandir}/man8/saned.8* %changelog +* 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