don't require libsane-hpaio (#430834) use %bcond_without/with macros
This commit is contained in:
parent
9babd84990
commit
e452c42681
@ -4,27 +4,31 @@
|
|||||||
# libs_split: ship libraries in separate subpackage
|
# libs_split: ship libraries in separate subpackage
|
||||||
# docs_split: ship documentation in separate subpackage
|
# docs_split: ship documentation in separate subpackage
|
||||||
|
|
||||||
%define gphoto2_support 0%{!?_without_gphoto2:1}
|
%bcond_without gphoto2_support
|
||||||
%define gphoto2_split 0%{!?_without_gphoto2:%{?_with_gphoto2_split:1}}
|
%if %{with gphoto2_support}
|
||||||
|
%bcond_without gphoto2_split
|
||||||
|
%else
|
||||||
|
%bcond_with gphoto2_split
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} >= 5 || 0%{?rhel} >= 5
|
%if 0%{?fedora} >= 5 || 0%{?rhel} >= 5
|
||||||
%define libs_split 0%{?!_without_libs_split:1}
|
%bcond_without libs_split
|
||||||
%define docs_split 0%{?_with_docs_split:1}
|
%bcond_with docs_split
|
||||||
%else
|
%else
|
||||||
%define libs_split 0%{?_with_libs_split:1}
|
%bcond_with libs_split
|
||||||
%define docs_split 0%{?!_without_docs_split:1}
|
%bcond_without docs_split
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} >= 7 || 0%{?rhel} >= 6
|
%if 0%{?fedora} >= 7 || 0%{?rhel} >= 6
|
||||||
%define udev_098 0%{?!_without_udev_098:1}
|
%bcond_without udev_098
|
||||||
%else
|
%else
|
||||||
%define udev_098 0%{?_with_udev_098:1}
|
%bcond_with udev_098
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Summary: Scanner access software
|
Summary: Scanner access software
|
||||||
Name: sane-backends
|
Name: sane-backends
|
||||||
Version: 1.0.18
|
Version: 1.0.18
|
||||||
Release: 20%{?dist}
|
Release: 21%{?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
|
||||||
@ -49,17 +53,15 @@ BuildRequires: libtiff-devel
|
|||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
%if %{gphoto2_support}
|
%if %{with gphoto2_support}
|
||||||
BuildRequires: gphoto2-devel
|
BuildRequires: gphoto2-devel
|
||||||
%endif
|
%endif
|
||||||
Requires: pam >= 0.78-2
|
Requires: pam >= 0.78-2
|
||||||
%if %udev_098
|
%if %{with udev_098}
|
||||||
Requires: udev >= 098
|
Requires: udev >= 098
|
||||||
%else
|
%else
|
||||||
Requires: udev
|
Requires: udev
|
||||||
%endif
|
%endif
|
||||||
# Disable this to work around circular deps when rebuilding for now
|
|
||||||
Requires: libsane-hpaio
|
|
||||||
ExcludeArch: s390 s390x
|
ExcludeArch: s390 s390x
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -73,7 +75,7 @@ Summary: SANE development toolkit
|
|||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: sane-backends = %{version}-%{release}, libusb-devel, libieee1284-devel
|
Requires: sane-backends = %{version}-%{release}, libusb-devel, libieee1284-devel
|
||||||
Requires: pkgconfig
|
Requires: pkgconfig
|
||||||
%if %{gphoto2_support}
|
%if %{with gphoto2_support}
|
||||||
Requires: gphoto2-devel
|
Requires: gphoto2-devel
|
||||||
%endif
|
%endif
|
||||||
Obsoletes: sane-devel
|
Obsoletes: sane-devel
|
||||||
@ -83,7 +85,7 @@ Provides: sane-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 %{docs_split}
|
%if %{with docs_split}
|
||||||
%package docs
|
%package docs
|
||||||
Summary: Additional documentation for SANE
|
Summary: Additional documentation for SANE
|
||||||
Group: Documentation
|
Group: Documentation
|
||||||
@ -92,14 +94,14 @@ Group: Documentation
|
|||||||
Additional documentation for SANE, a universal scanner interface.
|
Additional documentation for SANE, a universal scanner interface.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{libs_split}
|
%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 0%{?fedora} >= 5 || 0%{?rhel} >= 5
|
||||||
%if ! %{docs_split}
|
%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
|
%endif
|
||||||
@ -109,7 +111,7 @@ Provides: sane-backends-docs = %{?epoch:%{epoch}:}%{version}-%{release}
|
|||||||
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 %{gphoto2_split}
|
%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
|
||||||
@ -132,7 +134,7 @@ want to access digital cameras.
|
|||||||
%patch6 -p1 -b .usb_reset
|
%patch6 -p1 -b .usb_reset
|
||||||
%patch7 -p1 -b .udev-symlink
|
%patch7 -p1 -b .udev-symlink
|
||||||
|
|
||||||
%if %udev_098
|
%if %{with udev_098}
|
||||||
%patch8 -p1 -b .udev-098
|
%patch8 -p1 -b .udev-098
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -153,11 +155,13 @@ autoconf
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{expand:%%define optflags %{optflags} -DGIMP_ENABLE_COMPAT_CRUFT=1}
|
%{expand:%%define optflags %{optflags} -DGIMP_ENABLE_COMPAT_CRUFT=1}
|
||||||
%if %{gphoto2_support}
|
%configure \
|
||||||
%configure --with-gphoto2=%{_prefix} --with-docdir=%{_docdir}/%{name}-%{version}
|
%if %{with gphoto2_support}
|
||||||
|
--with-gphoto2=%{_prefix}\
|
||||||
%else
|
%else
|
||||||
%configure --without-gphoto2 --with-docdir=%{_docdir}/%{name}-%{version}
|
--without-gphoto2 \
|
||||||
%endif
|
%endif
|
||||||
|
--with-docdir=%{_docdir}/%{name}-%{version}
|
||||||
make
|
make
|
||||||
|
|
||||||
|
|
||||||
@ -181,7 +185,7 @@ install -m 0644 tools/udev/libsane.rules %{buildroot}/%{_sysconfdir}/udev/rules.
|
|||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%if %{libs_split}
|
%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
|
%else
|
||||||
@ -201,13 +205,13 @@ rm -rf %{buildroot}
|
|||||||
%{_bindir}/scanimage
|
%{_bindir}/scanimage
|
||||||
%{_sbindir}/*
|
%{_sbindir}/*
|
||||||
|
|
||||||
%if ! %{libs_split}
|
%if ! %{with libs_split}
|
||||||
%{_libdir}/libsane*.so.*
|
%{_libdir}/libsane*.so.*
|
||||||
%dir %{_libdir}/sane
|
%dir %{_libdir}/sane
|
||||||
%{_libdir}/sane/*.so.*
|
%{_libdir}/sane/*.so.*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if ! %{docs_split}
|
%if ! %{with docs_split}
|
||||||
%doc %{_docdir}/*
|
%doc %{_docdir}/*
|
||||||
%else
|
%else
|
||||||
%doc %{_docdir}/*
|
%doc %{_docdir}/*
|
||||||
@ -219,14 +223,14 @@ rm -rf %{buildroot}
|
|||||||
%exclude %{_docdir}/%{name}-%{version}/sane.ps
|
%exclude %{_docdir}/%{name}-%{version}/sane.ps
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{libs_split}
|
%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 %{gphoto2_split}
|
%if %{with gphoto2_split}
|
||||||
%exclude %{_libdir}/sane/*gphoto2.so.*
|
%exclude %{_libdir}/sane/*gphoto2.so.*
|
||||||
|
|
||||||
%files libs-gphoto2
|
%files libs-gphoto2
|
||||||
@ -235,7 +239,7 @@ rm -rf %{buildroot}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{docs_split}
|
%if %{with docs_split}
|
||||||
%files docs
|
%files docs
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%doc %{_docdir}/%{name}-%{version}/sane-backends.html
|
%doc %{_docdir}/%{name}-%{version}/sane-backends.html
|
||||||
@ -256,6 +260,10 @@ rm -rf %{buildroot}
|
|||||||
%{_libdir}/pkgconfig/sane-backends.pc
|
%{_libdir}/pkgconfig/sane-backends.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 30 2008 Nils Philippsen <nphilipp@redhat.com> - 1.0.18-21
|
||||||
|
- don't require libsane-hpaio (#430834)
|
||||||
|
- use %%bcond_without/with macros
|
||||||
|
|
||||||
* Fri Dec 07 2007 Jesse Keating <jkeating@redhat.com> - 1.0.18-20
|
* Fri Dec 07 2007 Jesse Keating <jkeating@redhat.com> - 1.0.18-20
|
||||||
- undo bootstrap setting now that hplip built.
|
- undo bootstrap setting now that hplip built.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user