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