remove ancient sane-devel obsoletes/provides remove libs/doc/gphoto2

conditionals fix build root add arch-specific provides/requires
    (#436657)
This commit is contained in:
Nils Philippsen 2008-03-10 10:10:56 +00:00
parent b18671caa1
commit 0d39d0adcd

View File

@ -1,28 +1,7 @@
# --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
%bcond_without gphoto2_support
%if %{with gphoto2_support}
%bcond_without gphoto2_split
%else
%bcond_with gphoto2_split
%endif
%if 0%{?fedora} >= 5 || 0%{?rhel} >= 5
%bcond_without libs_split
%bcond_with docs_split
%else
%bcond_with libs_split
%bcond_without docs_split
%endif
Summary: Scanner access software Summary: Scanner access software
Name: sane-backends Name: sane-backends
Version: 1.0.19 Version: 1.0.19
Release: 6%{?dist} Release: 7%{?dist}
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
@ -35,7 +14,7 @@ Patch3: sane-backends-1.0.18-glibc-2.7.patch
Patch4: sane-backends-1.0.19-policykit.patch Patch4: sane-backends-1.0.19-policykit.patch
Patch5: sane-backends-1.0.19-uninitialized.patch Patch5: sane-backends-1.0.19-uninitialized.patch
URL: http://www.sane-project.org URL: http://www.sane-project.org
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%__id_u -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%__id_u -n)
BuildRequires: tetex-latex BuildRequires: tetex-latex
BuildRequires: libusb-devel BuildRequires: libusb-devel
BuildRequires: libieee1284-devel BuildRequires: libieee1284-devel
@ -44,9 +23,7 @@ BuildRequires: libtiff-devel
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: libtool BuildRequires: libtool
BuildRequires: gettext BuildRequires: gettext
%if %{with gphoto2_support}
BuildRequires: gphoto2-devel BuildRequires: gphoto2-devel
%endif
Requires: pam >= 0.78-2 Requires: pam >= 0.78-2
Requires: hal >= 0.4.0 Requires: hal >= 0.4.0
ExcludeArch: s390 s390x ExcludeArch: s390 s390x
@ -60,55 +37,37 @@ hand-held scanner, video and still cameras, frame-grabbers, etc.).
%package devel %package devel
Summary: SANE development toolkit Summary: SANE development toolkit
Group: Development/Libraries Group: Development/Libraries
Requires: sane-backends = %{version}-%{release}, libusb-devel, libieee1284-devel Requires: sane-backends = %{version}-%{release}
Requires: libusb-devel
Requires: libieee1284-devel
Requires: pkgconfig Requires: pkgconfig
%if %{with gphoto2_support}
Requires: gphoto2-devel Requires: gphoto2-devel
%endif
Obsoletes: sane-devel
Provides: sane-devel
%description devel %description devel
This package contains static libraries and header files for writing Scanner This package contains static libraries and header files for writing Scanner
Access Now Easy (SANE) modules. Access Now Easy (SANE) modules.
%if %{with docs_split}
%package docs
Summary: Additional documentation for SANE
Group: Documentation
%description docs
Additional documentation for SANE, a universal scanner interface.
%endif
%if %{with libs_split}
%package libs %package libs
Summary: SANE libraries Summary: SANE libraries
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: sane-backends = %{?epoch:%{epoch}:}%{version}-%{release} Requires: sane-backends = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: sane-backends <= 1.0.17-12 Obsoletes: sane-backends <= 1.0.17-12
%if 0%{?fedora} >= 5 || 0%{?rhel} >= 5
%if ! %{with docs_split}
Obsoletes: sane-backends-docs <= 1.0.17-12 Obsoletes: sane-backends-docs <= 1.0.17-12
Provides: sane-backends-docs = %{?epoch:%{epoch}:}%{version}-%{release} Provides: sane-backends-docs = %{?epoch:%{epoch}:}%{version}-%{release}
%endif Provides: sane-backends-libs-%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
%endif
%description libs %description libs
This package contains the SANE libraries which are needed by applications that This package contains the SANE libraries which are needed by applications that
want to access scanners. want to access scanners.
%if %{with gphoto2_split}
%package libs-gphoto2 %package libs-gphoto2
Summary: SANE libraries for gphoto2 Summary: SANE libraries for gphoto2
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: sane-backends-libs = %{?epoch:%{epoch}:}%{version}-%{release} Requires: sane-backends-libs-%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
%description libs-gphoto2 %description libs-gphoto2
This package contains the SANE libraries which are needed by applications that This package contains the SANE libraries which are needed by applications that
want to access digital cameras. want to access digital cameras.
%endif
%endif
%prep %prep
%setup -q %setup -q
@ -130,11 +89,7 @@ autoreconf --install --force
%build %build
%configure \ %configure \
%if %{with gphoto2_support}
--with-gphoto2=%{_prefix} \ --with-gphoto2=%{_prefix} \
%else
--without-gphoto2 \
%endif
--with-docdir=%{_docdir}/%{name}-%{version} --with-docdir=%{_docdir}/%{name}-%{version}
make %{?_smp_mflags} make %{?_smp_mflags}
@ -161,13 +116,8 @@ install -m 0755 %{SOURCE2} %{buildroot}/%{_libexecdir}/hal-usb-scanner-add
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%if %{with libs_split}
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig
%else
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root) %defattr(-,root,root)
@ -182,50 +132,19 @@ rm -rf %{buildroot}
%{_bindir}/scanimage %{_bindir}/scanimage
%{_sbindir}/* %{_sbindir}/*
%if ! %{with libs_split}
%{_libdir}/libsane*.so.*
%dir %{_libdir}/sane
%{_libdir}/sane/*.so.*
%endif
%if ! %{with docs_split}
%doc %{_docdir}/* %doc %{_docdir}/*
%else
%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
%endif
%if %{with libs_split}
%files libs %files libs
%defattr(-, root, root) %defattr(-, root, root)
%{_libdir}/libsane*.so.* %{_libdir}/libsane*.so.*
%dir %{_libdir}/sane %dir %{_libdir}/sane
%{_libdir}/sane/*.so* %{_libdir}/sane/*.so*
%if %{with gphoto2_split}
%exclude %{_libdir}/sane/*gphoto2.so* %exclude %{_libdir}/sane/*gphoto2.so*
%files libs-gphoto2 %files libs-gphoto2
%defattr(-, root, root) %defattr(-, root, root)
%{_libdir}/sane/*gphoto2.so.* %{_libdir}/sane/*gphoto2.so.*
%endif
%endif
%if %{with docs_split}
%files docs
%defattr(-, root, root)
%doc %{_docdir}/%{name}-%{version}/sane-backends.html
%doc %{_docdir}/%{name}-%{version}/sane-backends-external.html
%doc %{_docdir}/%{name}-%{version}/sane-mfgs.html
%doc %{_docdir}/%{name}-%{version}/sane-mfgs-external.html
%doc %{_docdir}/%{name}-%{version}/sane.dvi
%doc %{_docdir}/%{name}-%{version}/sane.ps
%endif
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
@ -237,6 +156,12 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/sane-backends.pc %{_libdir}/pkgconfig/sane-backends.pc
%changelog %changelog
* Mon Mar 10 2008 Nils Philippsen <nphilipp@redhat.com> - 1.0.19-7
- remove ancient sane-devel obsoletes/provides
- remove libs/doc/gphoto2 conditionals
- fix build root
- add arch-specific provides/requires (#436657)
* Tue Feb 19 2008 Nils Philippsen <nphilipp@redhat.com> - 1.0.19-6 * Tue Feb 19 2008 Nils Philippsen <nphilipp@redhat.com> - 1.0.19-6
- move libsane-gphoto2.so into -libs-gphoto2 - move libsane-gphoto2.so into -libs-gphoto2
- recode spec file to UTF-8 - recode spec file to UTF-8