sane-vl.spec 13 KB

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