source: projects/specs/trunk/s/sane/sane-vl.spec @ 7338

Revision 7338, 12.9 KB checked in by iwaim, 11 years ago (diff)

sane 1.0.21-2

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