# # spec file for package iscan-free # # Copyright (c) 2012 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/ # Name: iscan BuildRequires: e2fsprogs-devel #BuildRequires: esound-devel BuildRequires: gcc-c++ #BuildRequires: gimp-devel #BuildRequires: gnome-common BuildRequires: libgphoto2-devel BuildRequires: libjpeg-devel BuildRequires: openssl-devel BuildRequires: popt-devel BuildRequires: sane-backends-devel #BuildRequires: update-desktop-files Url: http://www.avasys.jp/english/linux_e/index.html Summary: Free Image Scan Version with epkowa Driver for Epson Scanners License: GPL-2.0+ ; LGPL-2.1+ Group: Hardware/Scanner # How to make Source0: # Get the matching source from the iscan package (iscan_2.10.0-1.tar.bz2) # Unpack it: # tar -xjvf iscan_2.10.0-1.tar.bz2 # Remove only the really non-free files: # rm iscan-2.10.0/non-free/libesmod-i386*.so iscan-2.10.0/non-free/EAPL.*.txt # The remaining file filter.hh and the Makefiles are free software. # The proprietary binary-only i386-only libesmod library is needed only # to make the /usr/bin/iscan frontend and the EAPL.*.txt license files # apply only to this libesmod library. # By using "configure --disable-frontend" it builds without the frontend # (i.e. without the non-free libesmod library). # Pack the remaining free sources: # tar -cjvf iscan-free_2.10.0-1.tar.bz2 iscan-2.10.0/* Source0: iscan_2.29.3-1.tar.gz # A README regarding the changes of the free version: Source1: README Source3: /usr/share/iscan-data/epkowa.desc #Patch1: libltdl.patch # Patch3 replaces fixed HZ compile-time value by sysconf(_SC_CLK_TCK) runtime value: #Patch3: replace-HZ-by-sysconf_SC_CLK_TCK.patch # Patch4 applies fixes for GCC 4.3 (see http://en.opensuse.org/GCC_4.3_Transition): #Patch4: fixes-for-GCC43.patch # Patch5 fixes GCC 4.4 and glibc 2.10 issues, # see http://udrepper.livejournal.com/20948.html #Patch5: fixes-for-GCC44-glibc_2.10.patch # Patch10 changes the "sane-epkowa" man page so that those models are removed # which require a non-free binary-only i386-only plugin. To determine those models use # egrep '^:model|^:comment' doc/epkowa.desc | grep -B1 'non-free' | grep '^:model' #Patch10: adapt-man-for-free.patch #Patch11: fix-link.patch #Patch12: iscan-automake.patch Patch14: iscan-sane-ver.patch # Have Epson Avasys' release number at the end of the SUSE package Version: Version: 2.29.3 Release: 1 # See the post and triggerin sections what is pre-required: PreReq: coreutils, /bin/grep, /bin/sed Requires: sane-backends # Either iscan-free or iscan can be installed. # If iscan replaces iscan-free, proprietary software becomes installed. # If iscan-free replaces iscan, some scanner models do no longer work (see README). # Therefore real "Conflicts" (and not "Obsoletes" which does a silent replacement): Conflicts: iscan # Used to exclude libsane from the provide-list which is made by Autoreqprov: %define my_provides /tmp/my-provides # Install into this non-root directory (required when norootforbuild is used): BuildRoot: %{_tmppath}/%{name}-%{version}-build # Skip testing devel dependencies required by libtool .la files by the following comment: # skip-check-libtool-deps %prep # Be quiet when unpacking. # The directory in the Source0 archive is different because # the package name is different and Version has the Epson Avasys' release number at the end: %setup -q -n iscan-2.29.3 # Get the README regarding the changes of the free version: cp %{SOURCE1} . #%patch1 # Patch3 replaces fixed HZ compile-time value by sysconf(_SC_CLK_TCK) runtime value: #%patch3 # Patch4 applies fixes for GCC 4.3: #%patch4 # Patch5 fixes GCC 4.4 and glibc 2.10 issues: #%patch5 # Remove those models from the man page which require a non-free plugin: #%patch10 #%patch11 -p1 #%patch12 -p1 %patch14 -p0 # Distinguish the no longer supported models in the description file # but do not remove them because otherwise they would be no longer shown in YaST # when the package iscan-free is installed because the 'triggerin' section # replaces the description file and from this file YaST will re-build its database # using /usr/lib/YaST2/bin/create_scanner_database which tests if a comment # contains 'requires DFSG non-free' and if yes it sets the package name # in the YaST database to iscan (otherwise to iscan-free) so that YaST can # test and install the right package even for the no longer supported models: #grep -q 'requires DFSG non-free' doc/epkowa.desc || exit 1 #sed -i -e '/requires DFSG non-free/s/^:comment[[:space:]][[:space:]]*"/:comment "unsupported by the iscan-free package
/' doc/epkowa.desc #sed -i -e 's/requires DFSG non-free/requires DFSG non-free plugin in the iscan-proprietary-drivers package:/' doc/epkowa.desc %build rm -f m4/libtool.m4 autoreconf -fi # Set our preferred architecture-specific flags for the compiler and linker: # If -D_GNU_SOURCE is not set, the prototype for strndup in /usr/include/string.h is skipped. export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC" export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fno-strict-aliasing" # See /usr/lib/rpm/suse_macros regarding our RPM macros (e.g. sysconfdir is /etc). # enable-jpeg and enable-png is used in Epson Avasys' iscan.spec file. # By using disable-frontend it builds without the frontend (i.e. without the non-free stuff): %configure --disable-static \ --with-pic \ --enable-jpeg \ --enable-png \ --enable-tiff \ --disable-frontend %{__make} %{?jobs:-j%jobs} %install make install DESTDIR=${RPM_BUILD_ROOT} # Install the backend's config file: install -d %{buildroot}%{_sysconfdir}/sane.d/ install -m 644 backend/epkowa.conf %{buildroot}%{_sysconfdir}/sane.d/ # Install the backend's description file: install -d %{buildroot}%{_datadir}/iscan/ cp %{SOURCE3} doc # Change the manufacturer name to the same as in SANE's epson.desc file. grep -q '^:mfg[[:space:]][[:space:]]*"EPSON"' doc/epkowa.desc || exit 1 sed -e 's|^:mfg[[:space:]][[:space:]]*"EPSON".*|:mfg "Epson"|' doc/epkowa.desc >%{buildroot}%{_datadir}/iscan/epkowa.desc # Install the USB usermap file (list of USB manufacturer and model IDs) # and the matching hotplug script under /usr/share/iscan # and move the installed /usr/lib/iscan/make-udev-rules away # because we do not use any of them because our udev uses our resmgr to grant USB access # and resmgr does it without hotplug or usermap stuff. #install -m 644 utils/hotplug/iscan.usermap %{buildroot}%{_datadir}/iscan/ #install -m 755 utils/hotplug/iscan-device %{buildroot}%{_datadir}/iscan/ #mv %{buildroot}%{_libdir}/iscan/make-udev-rules %{buildroot}%{_datadir}/iscan/ # Remove the installed man page for the "iscan" frontend because it is not included in this package: #rm %{buildroot}%{_mandir}/man1/iscan.1 # Exclude libsane from the provide-list which is made by Autoreqprov: cat << EOF > %{my_provides} grep -v %{_libdir}/sane | %{__find_provides} EOF chmod 755 %{my_provides} %define __find_provides %{my_provides} #%find_lang iscan find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} + %post /sbin/ldconfig %triggerin -- sane-backends # The package sane-backends can be updated or installed after iscan-free. # In this case trigger to add the backend "epkowa" to /etc/sane.d/dll.conf if it is not there. # Note that this is also run when only iscan-free is installed or updated # and therefore the test that /etc/sane.d/dll.conf exists and is writable. if test -w /etc/sane.d/dll.conf then grep -q 'epkowa' /etc/sane.d/dll.conf || echo -e '# The epkowa backend is provided by the iscan-free package:\n#epkowa' >>/etc/sane.d/dll.conf fi # Save the sane-backends package backend description file and # copy the iscan-free package description file to the sane-backends package location # but don't overwrite epkowa.desc.sane when it already exists: if test -f /usr/share/sane/descriptions-external/epkowa.desc -a ! -f /usr/share/sane/descriptions-external/epkowa.desc.sane then mv /usr/share/sane/descriptions-external/epkowa.desc /usr/share/sane/descriptions-external/epkowa.desc.sane fi if test -d /usr/share/sane/descriptions-external/ then cp -p /usr/share/iscan/epkowa.desc /usr/share/sane/descriptions-external/ fi exit 0 %postun /sbin/ldconfig # If the package was removed (but not if it was updated) # then remove the epkowa lines in /etc/sane.d/dll.conf # Note that sane-backends may not be installed (see triggerin) # and therefore the test that /etc/sane.d/dll.conf exists and is writable. [ "$1" = "0" -a -w /etc/sane.d/dll.conf ] && sed -i -e '/epkowa/d' /etc/sane.d/dll.conf # Restore the sane-backends package backend description file: if test -f /usr/share/sane/descriptions-external/epkowa.desc.sane then mv -f /usr/share/sane/descriptions-external/epkowa.desc.sane /usr/share/sane/descriptions-external/epkowa.desc fi exit 0 %files #-f iscan.lang %defattr(-,root,root) %doc AUTHORS NEWS #COPYING COPYING.LIB AUTHORS NEWS %doc README %dir %{_sysconfdir}/sane.d %config %{_sysconfdir}/sane.d/epkowa.conf %dir %{_libdir}/sane %{_libdir}/sane/libsane-epkowa.so* %{_datadir}/iscan/ %{_mandir}/man5/sane-epkowa.5.gz /usr/sbin/iscan-registry /usr/share/iscan/epkowa.desc %{_mandir}/man8 # To produce the list of scanners which require a proprietary driver library, # get the latest SANE source file doc/descriptions-external/epkowa.desc # and run the following command: # egrep '^:model|^:comment' doc/descriptions-external/epkowa.desc \ # | grep -B1 'requires DFSG non-free' \ # | grep '^:model' | cut -s -d '"' -f2 \ # | tr ' \n' '_,' | sed -e 's/,/, /g' | fold -s -w 70 | tr '_' ' ' # To produce the list of scanners which require proprietary software # to support scanner network interfaces, run the following command: # egrep '^:model|^:comment' doc/descriptions-external/epkowa.desc \ # | grep -B1 'network interface supported via DFSG non-free' \ # | grep '^:model' | cut -s -d '"' -f2 \ # | tr ' \n' '_,' | sed -e 's/,/, /g' | fold -s -w 70 | tr '_' ' ' # To produce the list of scanners where the network interface # is not supported, run the following command: # egrep '^:model|^:comment' doc/descriptions-external/epkowa.desc \ # | grep -B1 'network interface not supported' \ # | grep '^:model' | cut -s -d '"' -f2 \ # | tr ' \n' '_,' | sed -e 's/,/, /g' | fold -s -w 70 | tr '_' ' ' %description This version of the Image Scan for Linux software contains only the free software parts of what Avasys provides. In particular this version of the Image Scan for Linux software neither contains any proprietary driver library nor firmware files nor proprietary software to support scanner network interfaces nor the proprietary "libesmod" library which would be required by the "/usr/bin/iscan" frontend which is also not provided. This package contains only the epkowa driver for SANE, which compiles and runs natively even on non-i386 platforms. For documentation, see "man sane-epkowa". The frontend /usr/bin/iscan was removed because it requires the proprietary "libesmod" library. This should cause no problem because the driver epkowa in this version of the Image Scan for Linux software runs natively even on non-i386 platforms so that the usual frontends (like scanimage and xsane) can be used even on non-i386 platforms. Drawbacks: The free version of the epkowa driver cannot work for those scanners that require a proprietary driver library (and a firmware file). As of this writing (June 2010), those scanners are the following models: ES-D400, GT-1500, GT-7200U, GT-7300U, GT-9400UF, GT-D1000, GT-F500, GT-F520, GT-F550, GT-F570, GT-F600, GT-F650, GT-F670, GT-F700, GT-F720, GT-S50, GT-S80, GT-S600, GT-S620, GT-X750, GT-X770, GT-X820, Perfection 1250, Perfection 1250 PHOTO, Perfection 1260, Perfection 1260 PHOTO, Perfection 2480 PHOTO, Perfection 2580 PHOTO, Perfection 3170 PHOTO, Perfection 3490 PHOTO, Perfection 3590 PHOTO, Perfection 4180 PHOTO, Perfection 4490 PHOTO, Perfection V10, Perfection V30, Perfection V100 Photo, Perfection V200 Photo, Perfection V300 Photo, Perfection V350 Photo, Perfection V500 Photo, Perfection V600 Photo, Stylus CX4300, Stylus CX4400, Stylus CX5500, Stylus CX5600, Stylus DX4400 Those models do not work with the free iscan version. The third-party Image Scan driver software from Avasys is required for those models. The Image Scan driver software is made and provided by Avasys at http://avasys.jp/eng/linux_driver/ where RPM packages for 32-bit (i386) and 64-bit (x86_64) architecture can be downloaded (provided you accept the Avasys and Epson license agreements). The Image Scan driver from Avasys contains proprietary binary-only software. For some models it is only available for 32-bit (i386) architecture which does not work when you have a 64-bit system installation. Some scanners are also supported by another (free-software) driver. When your scanner model requires a non-free (proprietary) module, you have to download and install two packages from Avasys: The 'iscan' package for the base software and an additional model dependant 'iscan-plugin' package with the proprietary module. Other scanners may only work via USB but require a proprietary software package which supports the network interface. As of this writing (June 2010), those scanners are the following models: Artisan 710 Series, Artisan 810 Series, EP-702A, EP-802A, EP-902A, ES-H7200, GT-20000, PX-602F, Stylus Office BX610FW Series, Stylus Office TX610FW Series, Stylus Photo PX650 Series, Stylus Photo PX710W Series, Stylus Photo PX810FW Series, Stylus Photo TX650 Series, Stylus Photo TX710W Series, Stylus SX610FW Series, WorkForce 610 Series To use those models via the network interface, you need the above mentioned third-party Image Scan driver software from Avasys plus an additional iscan-network-nt package from Avasys which provides support for the network interface. Note that the iscan-network-nt package from Avasys does not provide support for the network interface for all models. As of this writing (June 2010), the network interface of the following models is not supported: AcuLaser CX11NF, AcuLaser CX21, Artisan 700, Artisan 800, EP-801A, EP-901A, EP-901F, ES-H300, Expression 10000XL, Expression 10000XL Graphic Arts, Expression 10000XL Photo, GT-2500, LP-A500, LP-M5000, LP-M5500, LP-M5500F, LP-M5600, LP-M6000, ME Office 700FW, PM-A840S, PX-501A, PX-601F, Stylus Office BX600FW, Stylus Office TX600FW, Stylus Photo PX700W, Stylus Photo PX800FW, Stylus Photo TX700W, Stylus Photo TX800FW, Stylus NX400, Stylus NX410 Series, Stylus SX400, Stylus SX410 Series, Stylus SX600FW, Stylus TX400, Stylus TX410 Series, WorkForce 600 %changelog * Thu May 24 2012 idonmez@suse.com - Fix build with new automake * Sat Sep 10 2011 coolo@suse.com - fix build with newer ld * Tue Oct 26 2010 sbrabec@suse.cz - Removed obsolete BuildRequires of old branch of libxml. * Thu Sep 16 2010 jsmeix@suse.de - Replaced conditioned BuildRequires for sane-backends-devel if suse_version > 1130 by an unconditioned BuildRequires because iscan-free and sane-backends exist in the same openSUSE devel project "graphics" so that sane-backends-devel is available from this devel project for all repositories for which iscan-free is built (e.g. also if suse_version <= 1130). * Wed Sep 15 2010 aj@suse.de - Change BuildRequires for sane-backends devel split. * Thu Jun 17 2010 jsmeix@suse.de - Updated the lists of unsupported models in the RPM package description and let it no longer mention the packages iscan-proprietary-drivers, iscan-firmware, and iscan because those packages are no longer provided by openSUSE (see Novell/Suse Bugzilla bnc#569917). * Mon Jan 11 2010 vuntz@opensuse.org - Remove gdk-pixbuf-devel BuildRequires, since this is now building against gtk2. * Wed Aug 5 2009 jsmeix@suse.de - Removed db1-devel from BuildRequires because it is actually not needed to build it. * Wed Jul 29 2009 jsmeix@suse.de - fixes-for-GCC44-glibc_2.10.patch fixes GCC 4.4 and glibc 2.10 issues, see http://udrepper.livejournal.com/20948.html * Thu Apr 16 2009 crrodriguez@suse.de - Removed static libraries and "la" files via "--disable-static" in configure and '-type f -name "*.la" -exec ...__rm' to enforce detection of other software which use this stuff so that those other software could be fixed (see also Novell/Suse Bugzilla bnc#509945). - Replaced plain 'make' with '__make ... ?jobs:-j...jobs'. - Use 'find_lang iscan' and 'files -f iscan.lang' instead of the explicite file '_datadir/locale/*/LC_MESSAGES/iscan.mo'. * Wed Apr 16 2008 schwab@suse.de - Added some forward compatibility with libtool via libltdl.patch and 'rm -f m4/libtool.m4'. * Thu Apr 10 2008 jsmeix@suse.de - Updated to version 2.10.0-1 (results package version 2.10.0.1): There are many more supported models (for details see the NEWS file and see the epkowa.desc to find out which models require a proprietary 32-bit-only i386-only module so that they are are not supported by this package but require the 32-bit-only i386-only iscan package). * Tue Oct 16 2007 jsmeix@suse.de - Changed fixes-for-GCC43.patch as suggested by Olaf Meeuwissen so that it also works for GCC before 4.3. With the previous fixes-for-GCC43.patch GCC before 4.3 showed: "pisa_tool.h:59: multiple definition of 'double similarity..." and for GCC 4.3 the error was "pisa_tool.h:69: error: explicit template specialization cannot have a storage class". * Thu Oct 11 2007 jsmeix@suse.de - fixes-for-GCC43.patch applies fixes for GCC 4.3, see http://en.opensuse.org/GCC_4.3_Transition * Thu Aug 2 2007 jsmeix@suse.de - Updated to version 2.8.0-1 (results package version 2.8.0.1) only to keep iscan-free in compliance with our iscan package. There are no more supported scanners in iscan-free (the Perfection V200 PHOTO / GT-F670 requires iscan and the proprietary module iscan-plugin-gt-f670). * Wed Jul 11 2007 jsmeix@suse.de - Updated to version 2.7.0-1 (results package version 2.7.0.1): There are several more supported scanners. - fix-friend-declaration.diff no longer needed (fixed in source). * Mon Jan 29 2007 jsmeix@suse.de - Package 'sane' was renamed to 'sane-backends'. Adapted it so that it works with 'sane-backends' * Sat Oct 28 2006 meissner@suse.de - buildrequires libgphoto2-devel * Tue Oct 10 2006 jsmeix@suse.de - Updated to version 2.3.0-1 (results package version 2.3.0.1): There are several more supported scanners. * Thu Sep 21 2006 jsmeix@suse.de - Updated to version 2.2.0-1 (results package version 2.2.0.1): There are several more supported scanners. - fix-buffer-overflow.patch is no longer needed (fixed in source). * Tue Jul 4 2006 jsmeix@suse.de - replace-HZ-by-sysconf_SC_CLK_TCK.patch replaces the fixed HZ compile-time value (no longer supported by new glibc) by the more correct sysconf(_SC_CLK_TCK) runtime value. * Wed Jun 28 2006 jsmeix@suse.de - fix-buffer-overflow.patch fixes a too small char array which causes a buffer overflow if SANE_DEBUG_EPKOWA is set. * Mon Jun 26 2006 jsmeix@suse.de - Updated to version 2.1.0-1 (results package version 2.1.0.1): The disable-nonfree.patch is no longer needed because the new "configure --disable-frontend" option builds it without the /usr/bin/iscan frontend which is the only part which still would require proprietary binary-only i386-only software. All proprietary binary-only i386-only stuff was removed from the sources (i.e. the libesmod library and the EAPL license files). * Sun Jun 11 2006 ro@suse.de - remove unused gnome-vfs and oaf from BuildRequires * Wed Feb 1 2006 jsmeix@suse.de - Distinguish the no longer supported models in the description file but do not remove them because otherwise they would be no longer shown in YaST (i.e. no longer any user information that those models would work with the iscan package). * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Fri Jan 13 2006 jsmeix@suse.de - Re-enabled the patches which remove the no longer supported models from the "sane-epkowa" man page and from the "epkowa.desc" description file. * Fri Jan 13 2006 jsmeix@suse.de - Updated to version 1.18.0-1 (results package version 1.18.0.1). * Tue Nov 22 2005 jsmeix@suse.de - Added -fno-strict-aliasing to the CXXFLAGS to avoid problems in jpegstream.cc (lines 180, 195). * Mon Oct 10 2005 jsmeix@suse.de - Added missing forward declarations of friend functions. * Wed Oct 5 2005 jsmeix@suse.de - Updated to version 1.17.0-1 (results package version 1.17.0.1). * Tue Sep 27 2005 jsmeix@suse.de - Made a free version by removing all non-free stuff. For an overview see the README or the package description. In particular there is no longer the GIMP plugin link to the frontend /usr/bin/iscan because it was removed. * Mon Aug 8 2005 jsmeix@suse.de - Added GIMP plugin link (see "man iscan" and /usr/share/doc/packages/iscan/README). * Mon Aug 1 2005 jsmeix@suse.de - Added the USB usermap file to the iscan package to have the USB manufacturer and model IDs available for scanner detection. * Tue Jul 26 2005 jsmeix@suse.de - Updated to version 1.15.0-2 (results package version 1.15.0.2). - Removed obsolete fixes for GCC4 (gcc4.diff). - Added epkowa.desc to the iscan package. - Copy epkowa.desc via "triggerin" to the sane package location. * Fri Jul 1 2005 jsmeix@suse.de - Use RPM_OPT_FLAGS * Fri Apr 22 2005 jsmeix@suse.de - Updated to version 1.14.0-3 (results package version 1.14.0.3). - Added fixes for GCC4 (gcc4.diff). - Removed obsolete patch for epkowa.conf (see Jan 25 2005). * Tue Mar 22 2005 jsmeix@suse.de - Added PreReq. * Mon Mar 7 2005 ro@suse.de - block provides for libsane.so.1 (in sane package only) * Thu Feb 17 2005 jsmeix@suse.de - Update to version 1.13.1-1 (results package version 1.13.1.1). * Tue Feb 15 2005 jsmeix@suse.de - Using 'triggerin -- sane' to add the 'epkowa' backend to /etc/sane.d/dll.conf so that now sane can be re-installed from scratch without the need to re-install iscan too. * Wed Jan 26 2005 jsmeix@suse.de - Replaced '/usr/lib' by _libdir to be prepared for 64-bit but at the moment it cannot be built on non-i386 platforms because of the proprietary binary-only i-386-only libesmod.so * Tue Jan 25 2005 jsmeix@suse.de - Changed the wrong "usb ..." entry in epkowa.conf so that the epkowa backend can autodetect its known USB scanners. - If the package was removed then remove the epkowa lines in /etc/sane.d/dll.conf * Wed Jan 19 2005 jsmeix@suse.de - Update to version 1.13.0-3 (results package version 1.13.0.3). - Removed the redundant requirement for resmgr. - Simplified the RPM post install script to add the epkowa backend disabled (with leading '#') to /etc/sane.d/dll.conf * Mon Jul 19 2004 jsmeix@suse.de - Added libieee1284 because sane has now libieee1284 support and therefore ican links itself to libieee1284 libraries too. - To be safe added an explicite requirement for resmgr because libusb requires resmgr. * Thu Jun 24 2004 jsmeix@suse.de - initial version