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

Revision 12394, 15.2 KB checked in by tomop, 4 years ago (diff)

updated 4 packages

geeqie-1.5.1-1

lcms2-2.9-2

sane-1.0.29-1

xsane-0.999-3

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