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:
parent
b18671caa1
commit
0d39d0adcd
@ -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
|
||||
Name: sane-backends
|
||||
Version: 1.0.19
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?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
|
||||
@ -35,7 +14,7 @@ Patch3: sane-backends-1.0.18-glibc-2.7.patch
|
||||
Patch4: sane-backends-1.0.19-policykit.patch
|
||||
Patch5: sane-backends-1.0.19-uninitialized.patch
|
||||
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: libusb-devel
|
||||
BuildRequires: libieee1284-devel
|
||||
@ -44,9 +23,7 @@ BuildRequires: libtiff-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: libtool
|
||||
BuildRequires: gettext
|
||||
%if %{with gphoto2_support}
|
||||
BuildRequires: gphoto2-devel
|
||||
%endif
|
||||
Requires: pam >= 0.78-2
|
||||
Requires: hal >= 0.4.0
|
||||
ExcludeArch: s390 s390x
|
||||
@ -60,55 +37,37 @@ hand-held scanner, video and still cameras, frame-grabbers, etc.).
|
||||
%package devel
|
||||
Summary: SANE development toolkit
|
||||
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
|
||||
%if %{with 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 %{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
|
||||
Summary: SANE libraries
|
||||
Group: System Environment/Libraries
|
||||
Requires: sane-backends = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
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
|
||||
Provides: sane-backends-docs = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
%endif
|
||||
%endif
|
||||
Provides: sane-backends-libs-%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description libs
|
||||
This package contains the SANE libraries which are needed by applications that
|
||||
want to access scanners.
|
||||
|
||||
%if %{with gphoto2_split}
|
||||
%package libs-gphoto2
|
||||
Summary: SANE libraries for gphoto2
|
||||
Group: System Environment/Libraries
|
||||
Requires: sane-backends-libs = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: sane-backends-libs-%{_arch} = %{?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
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
@ -130,11 +89,7 @@ autoreconf --install --force
|
||||
|
||||
%build
|
||||
%configure \
|
||||
%if %{with gphoto2_support}
|
||||
--with-gphoto2=%{_prefix}\
|
||||
%else
|
||||
--without-gphoto2 \
|
||||
%endif
|
||||
--with-gphoto2=%{_prefix} \
|
||||
--with-docdir=%{_docdir}/%{name}-%{version}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
@ -161,13 +116,8 @@ install -m 0755 %{SOURCE2} %{buildroot}/%{_libexecdir}/hal-usb-scanner-add
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%if %{with 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)
|
||||
@ -182,50 +132,19 @@ rm -rf %{buildroot}
|
||||
%{_bindir}/scanimage
|
||||
%{_sbindir}/*
|
||||
|
||||
%if ! %{with libs_split}
|
||||
%{_libdir}/libsane*.so.*
|
||||
%dir %{_libdir}/sane
|
||||
%{_libdir}/sane/*.so.*
|
||||
%endif
|
||||
|
||||
%if ! %{with docs_split}
|
||||
%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
|
||||
%defattr(-, root, root)
|
||||
%{_libdir}/libsane*.so.*
|
||||
%dir %{_libdir}/sane
|
||||
%{_libdir}/sane/*.so*
|
||||
|
||||
%if %{with gphoto2_split}
|
||||
%exclude %{_libdir}/sane/*gphoto2.so*
|
||||
|
||||
%files libs-gphoto2
|
||||
%defattr(-, root, root)
|
||||
%{_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
|
||||
%defattr(-,root,root)
|
||||
@ -237,6 +156,12 @@ rm -rf %{buildroot}
|
||||
%{_libdir}/pkgconfig/sane-backends.pc
|
||||
|
||||
%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
|
||||
- move libsane-gphoto2.so into -libs-gphoto2
|
||||
- recode spec file to UTF-8
|
||||
|
Loading…
Reference in New Issue
Block a user