123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511 |
- %bcond_with systemd
- # To make src.rpm
- # rpm -bs --define 'src:1'
- # To make nosrc.rpm
- # rpm -bs --define 'nosrc:1'
- %{?!_udevhwdbdir:%global _udevhwdbdir /etc/udev/hwdb.d}
- %{?!_udevrulesdir:%global _udevrulesdir /lib/udev/rules.d}
- %define build_html 0
- Summary: SANE -- Easy local and networked scanner access
- Summary(ja): スキャナ操作ツール
- Name: sane
- Version: 1.0.30
- Release: 1%{?_dist_release}%{?with_systemd:.systemd}
- Group: Applications/Multimedia
- Vendor: Project Vine
- Distribution: Vine Linux
- License: GPL (programs), relaxed LGPL (libraries), and public domain (docs)
- URL: http://www.sane-project.org/
- Source: https://gitlab.com/sane-project/backends/uploads/c3dd60c9e054b5dee1e7b01a7edc98b0/sane-backends-1.0.30.tar.gz
- Source1: saned.xinetd
- Source2: saned.socket
- Source3: saned@.service.in
- Source5: 66-saned.rules
- Source10: sane-hierarchy.png
- %{?nosrc:NoSource: 0}
- #Icon: sane-logo.png
- Provides: libsane.so.1 sane-backends
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- BuildRequires: sed
- BuildRequires: libjpeg-devel
- BuildRequires: libusb1-devel
- BuildRequires: libgphoto2-devel
- #BuildPrereq: latex2html
- #BuildPrereq: emacs/or/xemacs pLaTeX2e/or/tetex-latex pTeX/or/tetex
- %if %{with systemd}
- BuildRequires: systemd-devel
- BuildRequires: systemd
- %{?systemd_requires}
- %else
- Requires: xinetd
- %endif
- %{?nosrc:%define src 1}
- %{?src:%define _src 1}
- %{?!src:%define _src 0}
- %description
- SANE (Scanner Access Now Easy) is a sane and simple interface
- to both local and networked scanners and other image acquisition devices
- like digital still and video cameras. SANE currently includes modules for
- accessing a range of scanners, including models from Agfa SnapScan, Apple,
- Artec, Canon, CoolScan, Epson, HP, Microtek, Mustek, Nikon, Siemens,
- Tamarack, UMAX, Connectix, QuickCams and other SANE devices via network.
- This package also include a client program 'scanimage','sane-find-scanner',
- 'xerox' and etc.
- For the latest information on SANE, the SANE standard definition, and
- mailing list access, see http://www.mostang.com/sane/
- %if %{_src}
- You need xemacs or emacs to build this package.
- And you need latex2html to build this package if you like html documents.
- %endif
- %description -l ja
- SANE (Scanner Access Now Easy) はローカル/ネットワーク・スキャナや
- デジタルカメラ、デジタルビデオカメラなど画像取り込み装置の簡単なイン
- ターフェースです。SANE は Agfa SnapScan, Apple, Artec, Canon, CoolScan,
- Epson, HP, Microtek, Mustek, Nikon, Siemens, Tamarack, UMAX, Connectix,
- QuickCams その他、いろいろなスキャナを使うことができます。
- コマンドラインで動くscanimage, sane-find-scanner, xeroxなどもこのパッケージに
- 含まれています。
- %if %{_src}
- このソースパッケージからビルドするにはxemacsまたはemacsが必要です。
- またHTMLドキュメントを含めるにはlatex2htmlが必要です。
- %endif
- %package devel
- Summary: SANE (Scanner Access Now Easy) development toolkit
- Summary(ja): SANE (Scanner Access Now Easy) 開発ツールキット
- Group: Development/Libraries
- Requires: %{name} = %{version}
- Requires: pkgconfig
- Requires: libjpeg-devel
- Requires: libgphoto2-devel
- Requires: libexif-devel
- Requires: libusb1-devel
- %description devel
- Static libraries and header files for writing SANE modules.
- %description devel -l ja
- SANE のモジュールを書くための、ヘッダファイルと静的ライブラリ
- です。
- %debug_package
- %prep
- %setup -q -n sane-backends-%{version}
- %build
- %configure \
- --enable-static \
- --with-usb \
- --with-gphoto2=%{_prefix} \
- %if %{with systemd}
- --with-systemd \
- %endif
- --disable-locking \
- --disable-rpath \
- --enable-pthread
- make %{?_smp_mflags}
- # Write udev/hwdb files
- _topdir="$PWD"
- pushd tools
- ./sane-desc -m udev+hwdb -s "${_topdir}/doc/descriptions:${_topdir}/doc/descriptions-external" -d0 > udev/sane-backends.rules
- ./sane-desc -m hwdb -s "${_topdir}/doc/descriptions:${_topdir}/doc/descriptions-external" -d0 > udev/sane-backends.hwdb
- popd
- # dll.conf: comment out all lines
- # epson.conf: add example for usb scanner
- ( cd backend
- cat dll.conf | %__sed "s/^\([^#]\)/#\1/" > dll.conf~
- %__mv -f dll.conf~ dll.conf
- echo "#usb /dev/usb/scanner0" >> epson.conf
- )
- %if %{build_html}
- ( cd doc
- %__make html
- %__mv sane html
- cd html
- %__cp -f %{SOURCE10} img1.png
- %__cat node10.html | \
- %__sed 's/WIDTH="5.." HEIGHT="2"/WIDTH="500" HEIGHT="246"/' \
- > node10.html~
- %__mv -f node10.html~ node10.html
- %__rm -f WARNINGS
- )
- [ -d doc/html ] || %__mkdir doc/html
- %endif
- %install
- %__rm -rf $RPM_BUILD_ROOT
- %{__make} install DESTDIR=${RPM_BUILD_ROOT}
- ln -sf saned $RPM_BUILD_ROOT%{_sbindir}/in.saned
- %__install -m755 tools/xerox $RPM_BUILD_ROOT%{_bindir}
- %__install -m755 tools/umax_pp $RPM_BUILD_ROOT%{_bindir}
- %__cp tools/README README.tools
- %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/%{name}
- %if %{build_html}
- %__cp doc/*.html doc/*.png doc/*.jpg $RPM_BUILD_ROOT%{_datadir}/%{name}
- ##%__mv doc/*.html doc/*.png doc/*.jpg doc/html
- %endif
- pushd $RPM_BUILD_ROOT%{_bindir}
- %__ln_s sane-find-scanner find-scanner
- popd
- # Create ld.so.conf.d entry
- mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
- cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
- %{_libdir}/%{name}
- EOF
- mkdir -p %{buildroot}%{_udevrulesdir}
- mkdir -p %{buildroot}%{_udevhwdbdir}
- install -m 0644 tools/udev/sane-backends.rules %{buildroot}%{_udevrulesdir}/65-sane-backends.rules
- install -m 0644 tools/udev/sane-backends.hwdb %{buildroot}%{_udevhwdbdir}/20-sane-backends.hwdb
- install -m 0644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/66-saned.rules
- %if %{with systemd}
- install -m 755 -d %{buildroot}%{_unitdir}
- install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
- sed 's|@CONFIGDIR@|%{_sysconfdir}/sane.d|g' < %{SOURCE3} > saned@.service
- install -m 644 saned@.service %{buildroot}%{_unitdir}
- %else
- mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d
- install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/xinetd.d/saned
- %endif
- rm -rf ./pkgdoc
- cp -rf %{buildroot}/%{_docdir}/sane-backends ./pkgdoc
- rm -rf %{buildroot}/%{_docdir}/sane-backends
- # clear uninstall files
- %__rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
- %__rm -rf $RPM_BUILD_ROOT%{_libdir}/lib*.la
- %__rm -rf $RPM_BUILD_ROOT%{_libdir}/sane/lib*.la
- %find_lang sane-backends
- %pre
- getent group saned >/dev/null || groupadd -r saned
- getent passwd saned >/dev/null || \
- useradd -r -g saned -d %{_datadir}/sane -s /sbin/nologin \
- -c "SANE scanner daemon user" saned
- exit 0
- %post
- /sbin/ldconfig
- udevadm hwdb --update >/dev/null 2>&1 || :
- %if %{with systemd}
- %systemd_post saned.socket
- %else
- # network settings
- SERVICES=%{_sysconfdir}/services
- if [ -x "%__grep" -a -f "$SERVICES" ] ; then
- %__grep -q "^sane" $SERVICES || \
- echo "sane 6566/tcp # network sccaner deamon" >> $SERVICES
- fi
- %endif
- %if %{with systemd}
- %preun
- %systemd_preun saned.socket
- %endif
- %postun
- /sbin/ldconfig
- udevadm hwdb --update >/dev/null 2>&1 || :
- %if %{with systemd}
- %systemd_postun_with_restart saned.socket
- %endif
- %clean
- %__rm -rf $RPM_BUILD_ROOT
- %files -f sane-backends.lang
- %defattr(-,root,root)
- %license COPYING LICENSE
- %doc pkgdoc/*
- %if %{build_html}
- %doc doc/html
- %endif
- %dir %{_sysconfdir}/sane.d
- %config %{_sysconfdir}/sane.d/*
- %config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
- %{_sbindir}/*
- %{_bindir}/find-scanner
- %{_bindir}/gamma4scanimage
- %{_bindir}/sane-find-scanner
- %{_bindir}/scanimage
- %{_bindir}/umax_pp
- %{_bindir}/xerox
- %{_libdir}/lib*.so.*
- %{_libdir}/lib*.so
- %{_libdir}/sane/lib*.so.*
- %{_libdir}/sane/lib*.so
- %dir %{_libdir}/sane
- %{_datadir}/sane
- %{_mandir}/man1/*.1*
- %{_mandir}/man5/*.5*
- %{_mandir}/man7/*.7*
- %{_mandir}/man8/*.8*
- %{_udevhwdbdir}/20-sane-backends.hwdb
- %{_udevrulesdir}/65-sane-backends.rules
- %{_udevrulesdir}/66-saned.rules
- %if %{with systemd}
- %{_unitdir}/saned.socket
- %{_unitdir}/saned@.service
- %else
- %{_sysconfdir}/xinetd.d/saned
- %endif
- %files devel
- %defattr(-,root,root)
- %{_bindir}/sane-config
- %{_includedir}/sane
- %{_libdir}/pkgconfig/sane-backends.pc
- %{_libdir}/lib*.a
- %{_libdir}/sane/lib*.a
- %changelog
- * Thu Jul 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.30-1
- - new upstream release.
- * Mon May 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.29-1
- - new upstream release.
- - dropped Patch0.
- - added xinetd support.
- - added systemd support (disabled as default).
- * Wed May 18 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.25-1
- - new upstream release.
- - replace BR:libusb with BR:libusb1.
- * Mon Feb 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.24-2
- - rebuild with libgphoto2-2.5.7
- * Sun Feb 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.24-1
- - update to 1.0.24
- - update Patch0 (sane-1.0.24-vine.patch)
- - remove Patch1 (sane-backends-1.0.21-i18n.patch)
- - fix %%post and %%postun (fix BTS:2514)
- * Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 1.0.21-2
- - build with libghoto2 2.5.0-1
- - stop generating HTML manual: missing man2html(1) in current VineSeed
- - add Vendor and Distribution tags
- * Sun Jul 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.21-1
- - new upstream release
- - change Patch (from sane-1.0.15-vine.patch to sane-1.0.21-vine.patch)
- - move sane-config to devel package
- - add Requires: libjpeg-devel, libgphoto2-devel, libexif-devel, libusb-devel (devel package)
- - add Patch1(sane-backends-1.0.21-i18n.patch)
- * Sun Oct 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.18-3
- - added BuildRequires: libgphoto2-devel instead of ghoto2-devel
- * Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 1.0.18-2
- - spec in utf-8
- * Mon May 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.18-1
- - applied new versioning policy
- - removed lib*.la files from devel package
- * Mon Dec 24 2007 Shu KONNO <owa@bg.wakwak.com> 1.0.18-0vl1
- - new upstream release
- * Sun Jan 09 2005 Satoshi MACHINO <machino@vinelinux.org> 1.0.15-0vl1
- - new upstream version(sane-1.0.15)
- - fixed spec file
- -- cleaned up patches
- -- added Requires: libjpeg, libusb
- -- added BuildRequires: glibc, libjpeg-devel, libusb-devel
- * Fri Oct 25 2002 Tomoya TAKA <taka@vinelinux.org> 1.0.8-0vl1
- - new upstream release
- - update sane-1.0.8-vine.patch
- - add --enable-static option to %%configure
- * Mon May 13 2002 Masaki Shinomiya <shino@pos.to>
- - 1.0.7-0vl2: sparc.patch, ppc.patch both from Mandrake(4mdk)
- - informed by Iohara [VinePlus:01130]
- * Thu Apr 4 2002 Masaki Shinomiya <shino@pos.to>
- - 1.0.7-0vl1 for Vine Linux-2.x
- - 1.0.7-0.1
- - set %_sysconfdir to /etc for RedHat6.x/Vine2.x
- * Wed Mar 6 2002 Masaki SHINOMIYA <shino@pos.to>
- - 1.0.7-0
- - new source
- - avoid listing %{_libdir}/sane from sane-devel
- - add LEVEL2 in doc
- * Fri Feb 1 2002 Masaki SHINOMIYA <shino@pos.to>
- - 1.0.6-0.3
- - allow to build without latex2html
- - prereq ldconfig, buildprereq sed, provide sane-backends
- * Sun Dec 23 2001 Masaki SHINOMIYA <shino@pos.to>
- - 1.0.6-0.2
- - dll.conf, epson.conf, network settings
- * Tue Dec 18 2001 Masaki SHINOMIYA <shino@pos.to>
- - 1.0.6-0.1
- - new source
- * Mon Dec 17 2001 Masaki SHINOMIYA <shino@pos.to>
- - 1.0.5-1.3
- - allow to use emacs or xemacs in building
- - nosrc
- #* Wed Oct 3 2001 Masaki SHINOMIYA <shino@pos.to>
- #- 1.0.5-1.2
- #- surpress swapping R<-->G colors on EPSON GT-8700/Perfection1640
- #- ( information from [vine-users:037559] tyu <tyu@mbd.nifty.com> )
- #- omit doc/*.tex etc.
- * Tue Sep 18 2001 Masaki SHINOMIYA <shino@pos.to>
- - 1.0.5-1.1
- - use emacs instead of xemacs in building
- * Sat Jul 7 2001 Masaki SHINOMIYA <shino@pos.to>
- - 1.0.5-1
- * Thu Jun 7 2001 Masaki SHINOMIYA <shino@pos.to>
- - 1.0.4 + epson backend ver.20010519
- - sane-clients is removed from this package
- - scanimage, find-scanner and xerox are left in this package
- * Thu May 17 2001 Masaki SHINOMIYA <shino@pos.to>
- - 1.0.4 + epson backend ver.20010331
- - 'scanimage' is included in the binary'sane-1.0.4-1.i386.rpm'package.
- - refined script for gimp plug-in setup
- - html documents shal be installed in the directory '/usr/share/sane'
- - automatically make device the file /dev/usb/scanner0
- * Wed Nov 15 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- - 1.0.3-0vl8
- - included missing "sane-config" script for sane
- * Tue Oct 17 2000 Jun Nishii <jun@vinelinux.org>
- - 1.0.3-0vl7
- - merge xscanimage patch
- * Mon Oct 16 2000 Jun Nishii <jun@vinelinux.org>
- - 1.0.3-0vl6
- - build with gimp-1.1.27
- * Sun Oct 1 2000 Jun Nishii <jun@vinelinux.org>
- - 1.0.3-0vl5
- - fixed group
- * Sat Sep 30 2000 Jun Nishii <jun@vinelinux.org>
- - 1.0.3-0vl4
- - added %defattr in clients
- * Tue Sep 26 2000 Jun Nishii <jun@vinelinux.org>
- - 1.0.3-0vl3
- - build with gimp-1.1.26
- * Mon Sep 25 2000 Jun Nishii <jun@vinelinux.org>
- - 1.0.3-0vl2
- - build with gimp-1.1.25
- * Thu Sep 21 2000 Jun Nishii <jun@vinelinux.org>
- - 1.0.3-0vl1
- * Thu Jun 8 2000 Jun Nishii <jun@vinelinux.org>
- - 1.0.2-0vl1
- * Mon Jan 17 2000 Jun Nishii <jun@vinelinux.org>
- - build for Vine Linux 2.0
- - added find-scanner, xerox
- * Fri Apr 23 1999 Hugo van der Kooij <hvdkooij@caiw.nl>
- - Fixed packaging a bit.
- * Wed Apr 21 1999 Hugo van der Kooij <hvdkooij@caiw.nl>
- - Updated package to 1.01
- * Fri Apr 09 1999 Hugo van der Kooij <hvdkooij@caiw.nl>
- - Split off the clients
- - Fixed a Alpha system anomaly by removing the specific backend.
- * Mon Nov 23 1998 Jonathan Miller <jlm@mvhi.com>
- [1.00-1]
- - upgraded to 1.00 (and made description less space-consuming)
- - included the post 1.00 fixed "configure" script available 22 Nov 1998.
- * Sat Aug 08 1998 Arne Coucheron <arneco@online.no>
- [0.74-3]
- - added /etc/sane.d to %dir in file list
- * Sat Aug 01 1998 Arne Coucheron <arneco@online.no>
- [0.74-2]
- - devel Group: reverted back to Development/Libraries
- - some changes to the %defattr and %attr usage in file list
- * Tue Jul 28 1998 Binaire <binaire@binaire.ml.org>
- [0.74-1]
- * Fri May 22 1998 Arne Coucheron <arneco@online.no>
- [0.73-3]
- - added use of %%{name} and %%{version} macros
- - added a %postun for running ldconfig after uninstall
- - using BuildRoot properly now
- - using %defattr and %attr macros in filelist, allows non-root build
- this means that RPM 2.5 is required to build this spec file now!
- - devel Group: changed to X11/Libraries
- - added using RPM_OPT_FLAGS during make
- - added striping of programs and libraries
- - added Requires: gtk+ >= 0.99.13 to main package
- - added Requires: %%{name} = %%{version} to devel package
- - added a %clean section for removing the buildroot dir
- - simplified the filelist and added %config for sane-style.rc
- - moved lib*.so to %files devel and dropped the *.la files
- - added -q parameter to %setup
- - removed some older changelog entries
- - removed the "fix ldconfig brokenness..." stuff
- - removed the Packager: line; use /etc/rpmrc if you want your name in
- - if GIMP is installed, make symlink from xscanimage to plug-ins dir
- - install the find-scanner program from the tools dir
- * Mon May 18 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
- - Version 0.73 was created: May 13 1998
- - gimp (original was build against 0.99.29)
- - gtk+ (original was build against 1.0.1)
- - dlh (original was build against 0.7d)
- - X11 development tree including xpm libraries.
- * Wed Apr 22 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
- - Binaries are now BuildRoot proof.
- * Wed Apr 22 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
- - Binaries are not BuildRoot proof. release 3 is done without BuildRoot!
- * Tue Apr 21 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
- - Temp. fix for some documentations problems with BuildRoot.
- * Sat Apr 11 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
- - Formal 0.72 now made as RPM! (Build against GTK+ 0.99.10 and GIMP 0.99.24)
- - Original package was released: Tue Apr 7 1998
|