File sane-frontends.spec of Package sane-frontends
#
# spec file for package sane-frontends (Version 1.0.14)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: sane-frontends
BuildRequires: gimp-devel libgphoto2-devel libjpeg-devel sane-backends update-desktop-files
License: GPL v2 or later
Group: Hardware/Scanner
AutoReqProv: on
Summary: SANE-frontends xscanimage, xcam, and scanadf
Version: 1.0.14
Release: 302
Url: http://www.sane-project.org/
# URL for Source0: http://alioth.debian.org/download.php/1140/sane-frontends-1.0.14.tar.gz
Source0: sane-frontends-%{version}.tar.bz2
# Patch0 to set the correct docdir for the frontends
# at the moment this patch is not needed because nothing is written to $(prefix)/doc/sane
# except what is installed "manually" in the install section
Patch0: sane-frontends-docdir.dif
# Fix "... is used uninitialized ..." warnings:
Patch1: fix-uninitialized-variables.diff
# Fix "array subscript out of range" error:
Patch2: fix-buffer-overflow.diff
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: /sbin/ldconfig
# Require the SANE base system in sane-backends explicitely to be on the safe side
# because whatever third-party scanner driver package (e.g. a third-party Iscan RPM)
# could provide libsane.so.1 by accident via RPM Autoreqprov, see our iscan-free.spec
# and iscan.spec how to exclude libsane from the provide-list of Autoreqprov.
Requires: sane-backends
# Provide the RPM capability "gimp-2.0-scanner-plugin" which is also provided by
# the xsane RPM so that the gimp RPM can recommend "gimp-2.0-scanner-plugin"
# so that either of xsane or sane-frontends are sufficient to be installed.
Provides: gimp-2.0-scanner-plugin
%description
xscanimage is a graphical scanner frontend for SANE. It can be invoked
either directly from the command-line or through the GIMP image
manipulation program.
xcam is a graphical camera frontend for SANE.
scanadf is a command-line frontend for SANE to control a scanner with
an automatic document feeder (ADF).
Authors:
--------
Andreas Beck <becka@sunserver1.rz.uni-duesseldorf.de>
David Mosberger <David.Mosberger@acm.org>
Maciek Podkomorzy <gammaray@satfilm.net.pl>
Tom Martone <tom@martoneconsulting.com>
Tristan Tarrant <ttarrant@etnoteam.it>
%prep
%setup -q
# Patch0 to set the correct docdir for the frontends
%patch0 -p0
# Fix "... is used uninitialized ..." warnings:
%patch1
# Fix "array subscript out of range" error:
%patch2
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
./configure --prefix=%{_prefix} \
--exec-prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} \
--libdir=%{_libdir} \
--sbindir=%{_sbindir} \
--mandir=%{_mandir} \
--datadir=%{_datadir}
make
%install
make install DESTDIR=$RPM_BUILD_ROOT
# Create GIMP plugin link (see "man xscanimage"):
install -d %{buildroot}%{_libdir}/gimp/2.0/plug-ins
ln -s %{_bindir}/xscanimage %{buildroot}%{_libdir}/gimp/2.0/plug-ins/xscanimage
# Install frontend specific documentation:
install -d $RPM_BUILD_ROOT/%{_defaultdocdir}/sane-frontends
# Avoid install's default permissions rwxr-xr-x by setting explicite permissions:
install -m 644 AUTHORS COPYING Changelog INSTALL NEWS PROBLEMS README $RPM_BUILD_ROOT/%{_defaultdocdir}/sane-frontends
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/xscanimage
%{_bindir}/xcam
%{_bindir}/scanadf
%dir %{_datadir}/sane
%{_datadir}/sane/sane-style.rc
%{_libdir}/gimp/2.0/plug-ins/xscanimage
%doc %{_mandir}/man1/scanadf.1.gz
%doc %{_mandir}/man1/xcam.1.gz
%doc %{_mandir}/man1/xscanimage.1.gz
%doc %{_defaultdocdir}/sane-frontends
%changelog
* Thu Sep 04 2008 jsmeix@suse.de
- Provide the RPM capability "gimp-2.0-scanner-plugin" which is
also provided by the xsane RPM so that the gimp RPM can
recommend "gimp-2.0-scanner-plugin" so that either of xsane
or sane-frontends are sufficient to be installed
(see Novell/Suse Bugzilla bnc#422558).
* Thu Feb 21 2008 jsmeix@suse.de
- Avoid install's default permissions rwxr-xr-x by setting
explicite permissions via '-m 644' so that the documentation
files are not executable.
* Wed Jan 31 2007 jsmeix@suse.de
- GNOME moved to /usr therefore the GIMP plugin link was
changed accordingly
* Mon Jan 29 2007 jsmeix@suse.de
- Package 'sane' was renamed to 'sane-backends'.
Adapted it so that it works with 'sane-backends'
* Thu Dec 07 2006 jsmeix@suse.de
- Changed /usr/X11R6/bin/ to /usr/bin/
(see Suse Bugzilla bnc#224882).
* Sat Oct 28 2006 meissner@suse.de
- buildrequires: libgphoto2-devel
* Mon Mar 27 2006 jsmeix@suse.de
- Fixed "array subscript out of range" error in xcam.c
(see Suse Bugzilla bnc#141851).
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jan 17 2006 jsmeix@suse.de
- Fixed "array subscript out of range" error.
See Suse Bugzilla bnc#134418 and bnc#141851.
* Wed Sep 21 2005 jsmeix@suse.de
- Updated to sane-frontends version 1.0.14.
* Sun Aug 21 2005 ro@suse.de
- removed requires for hotplug (deleted package)
* Fri Jun 17 2005 meissner@suse.de
- use RPM_OPT_FLAGS.
* Mon Nov 08 2004 jsmeix@suse.de
- split new package sane-frontends from the sane package
- new sane-frontends version 1.0.13