%define name xsane %define version 0.995 %define release 3%{?dist} Summary: An X Window System front-end for the SANE scanner interface Name: %{name} Version: %{version} Release: %{release} Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz Source1: xsane.conf.in Patch0: xsane-0.995-xdg-open.patch Patch1: xsane-0.995-eula-license-size.patch URL: http://www.xsane.org/ License: GPLv2+ Group: Applications/Multimedia BuildPrereq: sane-backends-devel, gimp-devel BuildPrereq: libpng-devel, libjpeg-devel, libtiff-devel BuildRequires: gphoto2-devel, lcms-devel, desktop-file-utils >= 0.2.92 BuildRequires: gettext-devel, sed ExcludeArch: s390 s390x Buildroot: %{_tmppath}/%{name}-%{version}-buildroot %description XSane is an X based interface for the SANE (Scanner Access Now Easy) library, which provides access to scanners, digital cameras, and other capture devices. XSane is written in GTK+ and provides control for performing the scan and then manipulating the captured image %package gimp Summary: A GIMP plug-in which provides the SANE scanner interface Group: Applications/Multimedia Requires(post): gimp >= 2:2.2.12-4 Requires(preun): gimp >= 2:2.2.12-4 %description gimp This package provides the regular XSane frontend for the SANE scanner interface, but it works as a GIMP plug-in. You must have GIMP installed to use this package. %prep rm -rf %{buildroot} %setup -q %patch0 -p1 -b .xdg-open %patch1 -p1 -b .eula-license-size %build %configure --enable-gimp make LDFLAGS= mv src/xsane src/xsane-gimp sed -e 's|@BINDIR@|%{_bindir}|g' < "%{SOURCE1}" > xsane.conf make clean %configure --disable-gimp make LDFLAGS= %install rm -rf %{buildroot} %makeinstall install src/xsane-gimp %{buildroot}%{_bindir} cat > %{name}.desktop << EOF [Desktop Entry] Version=1.0 Encoding=UTF-8 Type=Application Name=Scanner Tool GenericName=Scanner Tool Comment=Scan images to view, copy, fax or email them Exec=%{name} TryExec=%{name} Icon=/usr/share/sane/xsane/xsane-logo.xpm Terminal=false Categories=Graphics;2DGraphics;RasterGraphics;Scanning;GTK; StartupNotify=true EOF mkdir %{buildroot}%{_datadir}/applications desktop-file-install --vendor=fedora \ --dir %{buildroot}%{_datadir}/applications \ %{name}.desktop %find_lang %{name} XSANE.lang mkdir -p %{buildroot}%{_sysconfdir}/gimp/plugins.d install -m 0644 xsane.conf %{buildroot}%{_sysconfdir}/gimp/plugins.d/xsane.conf %clean rm -rf %{buildroot} %post gimp if [ -x "%{_sbindir}/gimp-plugin-mgr" ]; then %{_sbindir}/gimp-plugin-mgr --install xsane fi %preun gimp if [ $1 = 0 ]; then if [ -x "%{_sbindir}/gimp-plugin-mgr" ]; then %{_sbindir}/gimp-plugin-mgr --uninstall xsane fi fi %files -f XSANE.lang %defattr(-,root,root) %doc xsane.[A-Z]* %{_bindir}/xsane %{_mandir}/man1/* %{_datadir}/sane %dir %{_datadir}/applications %{_datadir}/applications/fedora-xsane.desktop %files gimp %defattr(-,root,root) %{_bindir}/xsane-gimp %dir %{_datadir}/sane %dir %{_datadir}/sane/xsane %{_datadir}/sane/xsane/*eula* %dir %{_sysconfdir}/gimp %dir %{_sysconfdir}/gimp/plugins.d %config(noreplace) %{_sysconfdir}/gimp/plugins.d/xsane.conf %changelog * Tue Jan 22 2008 Matthias Haase - 0.995-3 - Update to 0.995 - Latest patches and changes of Nils Philippsen added * Mon Mar 5 2007 Matthias Haase - 0.994-2 - Update to 0.994 * Wed Feb 7 2007 Matthias Haase - 0.992-2 - Update to 0.992 - lcms-devel added to BuildRequires * Sat Oct 28 2006 Matthias Haase - 0.991-4 - Increased release, rebuild for Fedora Core 6 * Fri Mar 24 2006 Matthias Haase - 0.991-3 - Increased release, rebuild for Fedora Core 5 * Tue Feb 21 2006 Matthias Haase - 0.991-2 - Some cometic changes * Tue Feb 7 2006 Matthias Haase - 0.991-1 - Update to 0.991 * Wed Jan 18 2006 Matthias Haase - 0.99-1 - Update to 0.99 - gphoto2-devel added to BuildRequires - Release enhanced with %{?dist} * Thu Dec 8 2005 Matthias Haase - 0.98b-2 - Update to 0.98b * Wed Nov 23 2005 Matthias Haase - 0.98a-2 - Update to 0.98a * Thu Jun 16 2005 Matthias Haase - 0.97-2 - Rebuild for Fedora Core 4 * Tue Jan 25 2005 Matthias Haase - Update to 0.97 * Wed Nov 10 2004 Matthias Haase - Rebuild for Fedora Core 3 * Wed Sep 08 2004 Matthias Haase - Update to 0.96 * Mon Aug 16 2004 Matthias Haase - Update to 0.95 * Tue Jun 01 2004 Matthias Haase - Rebuild for Fedora Core 2 * Tue May 25 2004 Matthias Haase - Update to 0.94 * Fri May 07 2004 Matthias Haase - Update to 0.93 - Patch for gimp2 removed * Sat Apr 04 2004 Matthias Haase - Rebuild for Fedora Core 1 with patch for gimp-plugin (Gimp 2.0) - Some minor changes for Gimp 2.0, matches now the "own style" * Sun Nov 09 2003 Matthias Haase - Rebuild for Fedora Core 1 * Sat Aug 30 2003 Matthias Haase - Update to 0.92 * Thu May 09 2003 Matthias Haase 0.91-1 - Rebuild for 0.91 * Sat Apr 09 2003 Matthias Haase 0.90-1 - Rebuild of 0.90 for RH9 * Wed Dec 18 2002 Matthias Haase 0.90-1 - Rebuild for 0.90 * Tue Dec 03 2002 Matthias Haase 0.89-1 - smp flag added * Sat Oct 26 2002 Matthias Haase 0.89-1 - Rebuild for xsane 0.89, internationalization macro and a short German description for the desktop link added * Fri Aug 30 2002 Tim Waugh 0.84-8 - Don't require gimp-devel (cf. bug #70754). * Tue Jul 23 2002 Tim Waugh 0.84-7 - Desktop file fixes (bug #69555). * Mon Jul 15 2002 Tim Waugh 0.84-6 - Use desktop-file-install. * Fri Jun 21 2002 Tim Powers 0.84-5 - automated rebuild * Wed Jun 12 2002 Tim Waugh 0.84-4 - Rebuild to fix bug #66132. * Thu May 23 2002 Tim Powers 0.84-3 - automated rebuild * Thu Feb 21 2002 Tim Waugh 0.84-2 - Rebuild in new environment. * Wed Jan 23 2002 Tim Waugh 0.84-1 - 0.84. - Remove explicit sane-backends dependency, since it is automatically found by rpm. * Wed Jan 09 2002 Tim Powers 0.83-2 - automated rebuild * Tue Jan 8 2002 Tim Waugh 0.83-1 - 0.83. * Tue Dec 11 2001 Tim Waugh 0.82-3.1 - 0.82. - Some extra patches from Oliver Rauch. - Require sane not sane-backends since it's available throughout 7.x. - Built for Red Hat Linux 7.1, 7.2. * Tue Jul 24 2001 Tim Waugh 0.77-4 - Build requires libpng-devel, libjpeg-devel (#bug 49760). * Tue Jul 17 2001 Preston Brown 0.77-3 - add an icon to the desktop entry * Tue Jun 19 2001 Florian La Roche - add ExcludeArch: s390 s390x * Mon Jun 11 2001 Tim Waugh 0.77-1 - 0.77. * Sun Jun 3 2001 Tim Waugh 0.76-2 - Require sane-backends, not all of sane. * Wed May 23 2001 Tim Waugh 0.76-1 - 0.76. * Thu May 3 2001 Tim Waugh 0.75-1 - 0.75 - Fix summary/description to match specspo. * Mon Jan 8 2001 Matt Wilson - fix post script of gimp subpackage to install into the correct location * Mon Dec 25 2000 Matt Wilson - rebuilt against gimp 1.2.0 * Thu Dec 21 2000 Matt Wilson - rebuilt against gimp 1.1.32 - use -DGIMP_ENABLE_COMPAT_CRUFT=1 to build with compat macros * Thu Oct 12 2000 Than Ngo - 0.62 * Wed Aug 23 2000 Matt Wilson - rebuilt against gimp-1.1.25 * Mon Aug 07 2000 Than Ngo - added swedish translation (Bug #15316) * Fri Aug 4 2000 Than Ngo - fix, shows error dialogbox if no scanner exists (Bug #15445) - update to 0.61 * Wed Aug 2 2000 Matt Wilson - rebuilt against new libpng * Thu Jul 13 2000 Prospector - automatic rebuild * Mon Jul 3 2000 Matt Wilson - rebuilt against gimp 1.1.24 - make clean before building non gimp version * Fri Jun 30 2000 Preston Brown - made gimp subpkg * Wed Jun 14 2000 Preston Brown - desktop entry added * Tue Jun 13 2000 Preston Brown - fixed gimp link - FHS paths * Tue May 30 2000 Karsten Hopp - update to 0.59 * Sat Jan 29 2000 TIm Powers - fixed bug 8948 * Thu Dec 2 1999 Tim Powers - updated to 0.47 - gzip man pages * Mon Aug 30 1999 Tim Powers - changed group * Mon Jul 26 1999 Tim Powers - update to 0.30 - added %defattr - built for 6.1 * Thu Apr 22 1999 Preston Brown - initial RPM for PowerTools 6.0