split package into sane-backends, -devel, -libs, -programs to work around

multilib issues (#135172)
This commit is contained in:
Nils Philippsen 2006-06-09 09:10:05 +00:00
parent 3c58eafcfb
commit d07e238d0b

View File

@ -1,10 +1,13 @@
# Disable gphoto2 backend by using "--without gphoto2" # Disable gphoto2 backend by using "--without gphoto2"
%define gphoto2_support 0%{!?_without_gphoto2:1} %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 Summary: Scanner access software
Name: sane-backends Name: sane-backends
Version: 1.0.17 Version: 1.0.17
Release: 12 Release: 13
License: GPL (programs), relaxed LGPL (libraries), and public domain (docs) License: GPL (programs), relaxed LGPL (libraries), and public domain (docs)
Group: System Environment/Libraries Group: System Environment/Libraries
Source0: ftp://ftp.sane-project.org/pub/sane/%{name}-%{version}/%{name}-%{version}.tar.gz 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: pam >= 0.78-2
Requires: udev Requires: udev
Requires: libsane-hpaio Requires: libsane-hpaio
Obsoletes: sane-backends-docs <= 1.0.17-12
Provides: sane-backends-docs
ExcludeArch: s390 s390x ExcludeArch: s390 s390x
%description %description
Scanner Access Now Easy (SANE) is a universal scanner interface. The Scanner Access Now Easy (SANE) is a universal scanner interface. The
SANE application programming interface (API) provides standardized SANE application programming interface (API) provides standardized
access to any raster image scanner hardware (flatbed scanner, access to any raster image scanner hardware (flatbed scanner,
hand-held scanner, video and still cameras, frame-grabbers, etc.). If hand-held scanner, video and still cameras, frame-grabbers, etc.).
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.
%package devel %package devel
Summary: The SANE (a universal scanner interface) development toolkit. Summary: SANE development toolkit
Group: Development/Libraries Group: Development/Libraries
Requires: sane-backends = %{version}, libusb-devel, libieee1284-devel Requires: sane-backends = %{version}, libusb-devel, libieee1284-devel
Requires: pkgconfig Requires: pkgconfig
@ -56,16 +50,37 @@ Obsoletes: sane-devel
Provides: sane-devel Provides: sane-devel
%description devel %description devel
Static libraries and header files for writing Scanner Access Now Easy This package contains static libraries and header files for writing Scanner
(SANE) modules. SANE is a universal scanner interface which is Access Now Easy (SANE) modules.
included in the sane-backends package.
%package docs %package libs
Summary: Additional documentation for SANE Summary: SANE libraries
Group: Documentation Group: System Environment/Libraries
Requires: sane-backends = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: sane-backends <= 1.0.17-12
%description docs %description libs
Additional documentation for SANE, a universal scanner interface. 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 %prep
%setup -q %setup -q
@ -108,6 +123,7 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}%{_datadir}/pixmaps mkdir -p %{buildroot}%{_datadir}/pixmaps
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps
rm -f %{buildroot}%{_bindir}/gamma4scanimage 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}/sane/*.a %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/libsane*.la %{buildroot}%{_libdir}/sane/*.la rm -f %{buildroot}%{_libdir}/libsane*.la %{buildroot}%{_libdir}/sane/*.la
mkdir -p %{buildroot}/%{_sysconfdir}/udev/rules.d/ 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 %find_lang %name
%clean %clean
rm -rf %{buildroot} 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 %files -f %{name}.lang
%defattr(-,root,root) %defattr(-,root,root)
%dir /etc/sane.d %dir /etc/sane.d
%config(noreplace) /etc/sane.d/* %config(noreplace) /etc/sane.d/*
%{_sysconfdir}/udev/rules.d/* %{_sysconfdir}/udev/rules.d/*
%{_bindir}/sane-find-scanner
%{_bindir}/scanimage
%{_sbindir}/*
%{_libdir}/libsane*.so.*
%dir %{_libdir}/sane
%{_libdir}/sane/*.so.*
%{_mandir}/*/* %{_mandir}/*/*
%exclude %{_mandir}/man1/*
%exclude %{_mandir}/man8/*
%{_datadir}/pixmaps/sane.png %{_datadir}/pixmaps/sane.png
%{_docdir}/* %doc %{_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
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/sane-config %{_bindir}/sane-config
%{_mandir}/man1/sane-config.1*
%{_includedir}/sane %{_includedir}/sane
%{_libdir}/libsane*.so %{_libdir}/libsane*.so
%{_libdir}/sane/*.so %{_libdir}/sane/*.so
%dir %{_libdir}/pkgconfig %dir %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/sane-backends.pc %{_libdir}/pkgconfig/sane-backends.pc
%files docs %files libs
%defattr(-, root, root) %defattr(-, root, root)
%{_docdir}/%{name}-%{version}/sane-backends.html %{_libdir}/libsane*.so.*
%{_docdir}/%{name}-%{version}/sane-backends-external.html %dir %{_libdir}/sane
%{_docdir}/%{name}-%{version}/sane-mfgs.html %{_libdir}/sane/*.so.*
%{_docdir}/%{name}-%{version}/sane-mfgs-external.html %if %{gphoto2_split}
%{_docdir}/%{name}-%{version}/sane.dvi %exclude %{_libdir}/sane/*gphoto2.so.*
%{_docdir}/%{name}-%{version}/sane.ps
%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 %changelog
* Fri Jun 09 2006 Nils Philippsen <nphilipp@redhat.com> 1.0.17-13
- split package into sane-backends, -devel, -libs, -programs to work around
multilib issues (#135172)
* Wed Jun 07 2006 Nils Philippsen <nphilipp@redhat.com> 1.0.17-12 * Wed Jun 07 2006 Nils Philippsen <nphilipp@redhat.com> 1.0.17-12
- require libsane-hpaio to work around #165751 - require libsane-hpaio to work around #165751