sane-vl.spec 12 KB

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