sane-vl.spec 13 KB

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