sane-vl.spec 13 KB

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