sane-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. # To make src.rpm
  2. # rpm -bs --define 'src:1'
  3. # To make nosrc.rpm
  4. # rpm -bs --define 'nosrc:1'
  5. Summary: SANE -- Easy local and networked scanner access
  6. Summary(ja): スキャナ操作ツール
  7. Name: sane
  8. Version: 1.0.21
  9. Release: 1%{?_dist_release}
  10. URL: http://www.sane-project.org/
  11. Source: ftp://ftp.sane-project.org/pub/sane/%{name}-backends-%{version}.tar.gz
  12. Source10: sane-hierarchy.png
  13. Patch0: sane-1.0.21-vine.patch
  14. Patch1: sane-backends-1.0.21-i18n.patch
  15. %{?nosrc:NoSource: 0}
  16. License: GPL (programs), relaxed LGPL (libraries), and public domain (docs)
  17. Group: Applications/Multimedia
  18. #Icon: sane-logo.png
  19. Provides: libsane.so.1 sane-backends
  20. Requires: libjpeg, libusb
  21. BuildRequires: sed
  22. BuildRequires: libjpeg-devel
  23. BuildRequires: libusb-devel
  24. BuildRequires: libgphoto2-devel
  25. #BuildPrereq: latex2html
  26. #BuildPrereq: emacs/or/xemacs pLaTeX2e/or/tetex-latex pTeX/or/tetex
  27. Buildroot: %{_tmppath}/%{name}-%{version}-root
  28. %{?nosrc:%define src 1}
  29. %{?src:%define _src 1}
  30. %{?!src:%define _src 0}
  31. %description
  32. SANE (Scanner Access Now Easy) is a sane and simple interface
  33. to both local and networked scanners and other image acquisition devices
  34. like digital still and video cameras. SANE currently includes modules for
  35. accessing a range of scanners, including models from Agfa SnapScan, Apple,
  36. Artec, Canon, CoolScan, Epson, HP, Microtek, Mustek, Nikon, Siemens,
  37. Tamarack, UMAX, Connectix, QuickCams and other SANE devices via network.
  38. This package also include a client program 'scanimage','sane-find-scanner',
  39. 'xerox' and etc.
  40. For the latest information on SANE, the SANE standard definition, and
  41. mailing list access, see http://www.mostang.com/sane/
  42. %if %{_src}
  43. You need xemacs or emacs to build this package.
  44. And you need latex2html to build this package if you like html documents.
  45. %endif
  46. %description -l ja
  47. SANE (Scanner Access Now Easy) はローカル/ネットワーク・スキャナや
  48. デジタルカメラ、デジタルビデオカメラなど画像取り込み装置の簡単なイン
  49. ターフェースです。SANE は Agfa SnapScan, Apple, Artec, Canon, CoolScan,
  50. Epson, HP, Microtek, Mustek, Nikon, Siemens, Tamarack, UMAX, Connectix,
  51. QuickCams その他、いろいろなスキャナを使うことができます。
  52. コマンドラインで動くscanimage, sane-find-scanner, xeroxなどもこのパッケージに
  53. 含まれています。
  54. %if %{_src}
  55. このソースパッケージからビルドするにはxemacsまたはemacsが必要です。
  56. またHTMLドキュメントを含めるにはlatex2htmlが必要です。
  57. %endif
  58. %package devel
  59. Summary: SANE (Scanner Access Now Easy) development toolkit
  60. Summary(ja): SANE (Scanner Access Now Easy) 開発ツールキット
  61. Group: Development/Libraries
  62. Requires: %{name} = %{version}
  63. Requires: libjpeg-devel
  64. Requires: libgphoto2-devel
  65. Requires: libexif-devel
  66. Requires: libusb-devel
  67. %description devel
  68. Static libraries and header files for writing SANE modules.
  69. %description devel -l ja
  70. SANE のモジュールを書くための、ヘッダファイルと静的ライブラリ
  71. です。
  72. %prep
  73. %setup -q -n %{name}-backends-%{version}
  74. %patch0 -p1 -b .vine
  75. %patch1 -p1 -b .i18n
  76. %build
  77. %configure --with-gnu-ld --enable-static
  78. # don't set smp flags!
  79. make
  80. # dll.conf: comment out all lines
  81. # epson.conf: add example for usb scanner
  82. ( cd backend
  83. cat dll.conf | %__sed "s/^\([^#]\)/#\1/" > dll.conf~
  84. %__mv -f dll.conf~ dll.conf
  85. echo "#usb /dev/usb/scanner0" >> epson.conf
  86. )
  87. ( cd doc
  88. %__make html
  89. %__mv sane html
  90. cd html
  91. %__cp -f %{SOURCE10} img1.png
  92. %__cat node10.html | \
  93. %__sed 's/WIDTH="5.." HEIGHT="2"/WIDTH="500" HEIGHT="246"/' \
  94. > node10.html~
  95. %__mv -f node10.html~ node10.html
  96. %__rm -f WARNINGS
  97. )
  98. [ -d doc/html ] || %__mkdir doc/html
  99. %install
  100. %__rm -rf $RPM_BUILD_ROOT
  101. %{__make} install DESTDIR=${RPM_BUILD_ROOT}
  102. %__mv $RPM_BUILD_ROOT%{_sbindir}/saned $RPM_BUILD_ROOT%{_sbindir}/in.saned
  103. %__install -m755 tools/xerox $RPM_BUILD_ROOT%{_bindir}
  104. %__install -m755 tools/umax_pp $RPM_BUILD_ROOT%{_bindir}
  105. %__cp tools/README README.tools
  106. %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/%{name}
  107. %__cp doc/*.html doc/*.png doc/*.jpg $RPM_BUILD_ROOT%{_datadir}/%{name}
  108. ##%__mv doc/*.html doc/*.png doc/*.jpg doc/html
  109. pushd $RPM_BUILD_ROOT%{_bindir}
  110. %__ln_s sane-find-scanner find-scanner
  111. popd
  112. # clear uninstall files
  113. %__rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
  114. %__rm -rf $RPM_BUILD_ROOT%{_libdir}/lib*.la
  115. %__rm -rf $RPM_BUILD_ROOT%{_libdir}/sane/lib*.la
  116. %post
  117. %__grep -q %{_libdir}/sane %{_sysconfdir}/ld.so.conf || \
  118. echo %{_libdir}/sane >> %{_sysconfdir}/ld.so.conf
  119. /sbin/ldconfig
  120. [ -d /dev/usb ] || %__mkdir /dev/usb
  121. [ -c /dev/usb/scanner0 ] || mknod /dev/usb/scanner0 c 180 48 -m 777
  122. # network settings
  123. SERVICES=%{_sysconfdir}/services
  124. if [ -x "%__grep" -a -f "$SERVICES" ] ; then
  125. %__grep -q "^sane" $SERVICES || \
  126. echo "sane 6566/tcp # network sccaner deamon" >> $SERVICES
  127. fi
  128. INETDCONF=%{_sysconfdir}/inetd.conf
  129. if [ -x "%__grep" -a -f "$INETDCONF" ] ; then
  130. %__grep -q "^#*sane" $INETDCONF || \
  131. echo "#sane stream tcp nowait root %{_sbindir}/in.saned %{_sbindir}/in.saned" >> $INETDCONF
  132. fi
  133. #kill -HUP `/sbin/pidof inetd`
  134. %postun
  135. # process for uninstallation, not for upgrading.
  136. if [ $1 = 0 ]; then
  137. %__mv %{_sysconfdir}/ld.so.conf %{_sysconfdir}/ld.so.conf.orig
  138. %__grep -v "%{_libdir}/sane" %{_sysconfdir}/ld.so.conf.orig > %{_sysconfdir}/ld.so.conf
  139. %__rm %{_sysconfdir}/ld.so.conf.orig
  140. fi
  141. /sbin/ldconfig
  142. %clean
  143. %__rm -rf $RPM_BUILD_ROOT
  144. %files
  145. %defattr(-,root,root)
  146. %doc README* AUTHORS ChangeLog* COPYING LICENSE PROBLEMS PROJECTS NEWS
  147. %doc doc/figs doc/icons doc/html doc/canon doc/mustek doc/mustek_usb doc/umax
  148. %doc doc/*.{txt,tex,sty}
  149. %doc tools
  150. %dir %{_sysconfdir}/sane.d
  151. %config %{_sysconfdir}/sane.d/*
  152. %{_sbindir}/*
  153. %{_bindir}/find-scanner
  154. %{_bindir}/gamma4scanimage
  155. %{_bindir}/sane-find-scanner
  156. %{_bindir}/scanimage
  157. %{_bindir}/umax_pp
  158. %{_bindir}/xerox
  159. %{_libdir}/lib*.so.*
  160. %{_libdir}/lib*.so
  161. %{_libdir}/sane/lib*.so.*
  162. %{_libdir}/sane/lib*.so
  163. %dir %{_libdir}/sane
  164. %{_datadir}/sane
  165. %{_mandir}/man1/*.1*
  166. %{_mandir}/man5/*.5*
  167. %{_mandir}/man7/*.7*
  168. %{_mandir}/man8/*.8*
  169. %{_datadir}/locale
  170. %files devel
  171. %defattr(-,root,root)
  172. %{_bindir}/sane-config
  173. %{_includedir}/sane
  174. %{_libdir}/lib*.a
  175. #{_libdir}/lib*.la
  176. %{_libdir}/sane/lib*.a
  177. #{_libdir}/sane/lib*.la
  178. %changelog
  179. * Sun Jul 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.21-1
  180. - new upstream release
  181. - change Patch (from sane-1.0.15-vine.patch to sane-1.0.21-vine.patch)
  182. - move sane-config to devel package
  183. - add Requires: libjpeg-devel, libgphoto2-devel, libexif-devel, libusb-devel (devel package)
  184. - add Patch1(sane-backends-1.0.21-i18n.patch)
  185. * Sun Oct 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.18-3
  186. - added BuildRequires: libgphoto2-devel instead of ghoto2-devel
  187. * Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 1.0.18-2
  188. - spec in utf-8
  189. * Mon May 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.18-1
  190. - applied new versioning policy
  191. - removed lib*.la files from devel package
  192. * Mon Dec 24 2007 Shu KONNO <owa@bg.wakwak.com> 1.0.18-0vl1
  193. - new upstream release
  194. * Sun Jan 09 2005 Satoshi MACHINO <machino@vinelinux.org> 1.0.15-0vl1
  195. - new upstream version(sane-1.0.15)
  196. - fixed spec file
  197. -- cleaned up patches
  198. -- added Requires: libjpeg, libusb
  199. -- added BuildRequires: glibc, libjpeg-devel, libusb-devel
  200. * Fri Oct 25 2002 Tomoya TAKA <taka@vinelinux.org> 1.0.8-0vl1
  201. - new upstream release
  202. - update sane-1.0.8-vine.patch
  203. - add --enable-static option to %%configure
  204. * Mon May 13 2002 Masaki Shinomiya <shino@pos.to>
  205. - 1.0.7-0vl2: sparc.patch, ppc.patch both from Mandrake(4mdk)
  206. - informed by Iohara [VinePlus:01130]
  207. * Wed Apr 4 2002 Masaki Shinomiya <shino@pos.to>
  208. - 1.0.7-0vl1 for Vine Linux-2.x
  209. - 1.0.7-0.1
  210. - set %_sysconfdir to /etc for RedHat6.x/Vine2.x
  211. * Wed Mar 6 2002 Masaki SHINOMIYA <shino@pos.to>
  212. - 1.0.7-0
  213. - new source
  214. - avoid listing %{_libdir}/sane from sane-devel
  215. - add LEVEL2 in doc
  216. * Fri Feb 1 2002 Masaki SHINOMIYA <shino@pos.to>
  217. - 1.0.6-0.3
  218. - allow to build without latex2html
  219. - prereq ldconfig, buildprereq sed, provide sane-backends
  220. * Tue Dec 23 2001 Masaki SHINOMIYA <shino@pos.to>
  221. - 1.0.6-0.2
  222. - dll.conf, epson.conf, network settings
  223. * Tue Dec 18 2001 Masaki SHINOMIYA <shino@pos.to>
  224. - 1.0.6-0.1
  225. - new source
  226. * Mon Dec 17 2001 Masaki SHINOMIYA <shino@pos.to>
  227. - 1.0.5-1.3
  228. - allow to use emacs or xemacs in building
  229. - nosrc
  230. #* Wed Oct 3 2001 Masaki SHINOMIYA <shino@pos.to>
  231. #- 1.0.5-1.2
  232. #- surpress swapping R<-->G colors on EPSON GT-8700/Perfection1640
  233. #- ( information from [vine-users:037559] tyu <tyu@mbd.nifty.com> )
  234. #- omit doc/*.tex etc.
  235. * Tue Sep 18 2001 Masaki SHINOMIYA <shino@pos.to>
  236. - 1.0.5-1.1
  237. - use emacs instead of xemacs in building
  238. * Sat Jul 7 2001 Masaki SHINOMIYA <shino@pos.to>
  239. - 1.0.5-1
  240. * Thu Jun 7 2001 Masaki SHINOMIYA <shino@pos.to>
  241. - 1.0.4 + epson backend ver.20010519
  242. - sane-clients is removed from this package
  243. - scanimage, find-scanner and xerox are left in this package
  244. * Wed May 17 2001 Masaki SHINOMIYA <shino@pos.to>
  245. - 1.0.4 + epson backend ver.20010331
  246. - 'scanimage' is included in the binary'sane-1.0.4-1.i386.rpm'package.
  247. - refined script for gimp plug-in setup
  248. - html documents shal be installed in the directory '/usr/share/sane'
  249. - automatically make device the file /dev/usb/scanner0
  250. * Wed Nov 15 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  251. - 1.0.3-0vl8
  252. - included missing "sane-config" script for sane
  253. * Tue Oct 17 2000 Jun Nishii <jun@vinelinux.org>
  254. - 1.0.3-0vl7
  255. - merge xscanimage patch
  256. * Mon Oct 16 2000 Jun Nishii <jun@vinelinux.org>
  257. - 1.0.3-0vl6
  258. - build with gimp-1.1.27
  259. * Sun Oct 1 2000 Jun Nishii <jun@vinelinux.org>
  260. - 1.0.3-0vl5
  261. - fixed group
  262. * Sat Sep 30 2000 Jun Nishii <jun@vinelinux.org>
  263. - 1.0.3-0vl4
  264. - added %defattr in clients
  265. * Tue Sep 26 2000 Jun Nishii <jun@vinelinux.org>
  266. - 1.0.3-0vl3
  267. - build with gimp-1.1.26
  268. * Mon Sep 25 2000 Jun Nishii <jun@vinelinux.org>
  269. - 1.0.3-0vl2
  270. - build with gimp-1.1.25
  271. * Thu Sep 21 2000 Jun Nishii <jun@vinelinux.org>
  272. - 1.0.3-0vl1
  273. * Thu Jun 8 2000 Jun Nishii <jun@vinelinux.org>
  274. - 1.0.2-0vl1
  275. * Mon Jan 17 2000 Jun Nishii <jun@vinelinux.org>
  276. - build for Vine Linux 2.0
  277. - added find-scanner, xerox
  278. * Fri Apr 23 1999 Hugo van der Kooij <hvdkooij@caiw.nl>
  279. - Fixed packaging a bit.
  280. * Wed Apr 21 1999 Hugo van der Kooij <hvdkooij@caiw.nl>
  281. - Updated package to 1.01
  282. * Fri Apr 09 1999 Hugo van der Kooij <hvdkooij@caiw.nl>
  283. - Split off the clients
  284. - Fixed a Alpha system anomaly by removing the specific backend.
  285. * Mon Nov 23 1998 Jonathan Miller <jlm@mvhi.com>
  286. [1.00-1]
  287. - upgraded to 1.00 (and made description less space-consuming)
  288. - included the post 1.00 fixed "configure" script available 22 Nov 1998.
  289. * Sat Aug 08 1998 Arne Coucheron <arneco@online.no>
  290. [0.74-3]
  291. - added /etc/sane.d to %dir in file list
  292. * Sat Aug 01 1998 Arne Coucheron <arneco@online.no>
  293. [0.74-2]
  294. - devel Group: reverted back to Development/Libraries
  295. - some changes to the %defattr and %attr usage in file list
  296. * Tue Jul 28 1998 Binaire <binaire@binaire.ml.org>
  297. [0.74-1]
  298. * Fri May 22 1998 Arne Coucheron <arneco@online.no>
  299. [0.73-3]
  300. - added use of %%{name} and %%{version} macros
  301. - added a %postun for running ldconfig after uninstall
  302. - using BuildRoot properly now
  303. - using %defattr and %attr macros in filelist, allows non-root build
  304. this means that RPM 2.5 is required to build this spec file now!
  305. - devel Group: changed to X11/Libraries
  306. - added using RPM_OPT_FLAGS during make
  307. - added striping of programs and libraries
  308. - added Requires: gtk+ >= 0.99.13 to main package
  309. - added Requires: %%{name} = %%{version} to devel package
  310. - added a %clean section for removing the buildroot dir
  311. - simplified the filelist and added %config for sane-style.rc
  312. - moved lib*.so to %files devel and dropped the *.la files
  313. - added -q parameter to %setup
  314. - removed some older changelog entries
  315. - removed the "fix ldconfig brokenness..." stuff
  316. - removed the Packager: line; use /etc/rpmrc if you want your name in
  317. - if GIMP is installed, make symlink from xscanimage to plug-ins dir
  318. - install the find-scanner program from the tools dir
  319. * Mon May 18 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
  320. - Version 0.73 was created: May 13 1998
  321. - gimp (original was build against 0.99.29)
  322. - gtk+ (original was build against 1.0.1)
  323. - dlh (original was build against 0.7d)
  324. - X11 development tree including xpm libraries.
  325. * Wed Apr 22 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
  326. - Binaries are now BuildRoot proof.
  327. * Wed Apr 22 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
  328. - Binaries are not BuildRoot proof. release 3 is done without BuildRoot!
  329. * Tue Apr 21 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
  330. - Temp. fix for some documentations problems with BuildRoot.
  331. * Sat Apr 11 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
  332. - Formal 0.72 now made as RPM! (Build against GTK+ 0.99.10 and GIMP 0.99.24)
  333. - Original package was released: Tue Apr 7 1998