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

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

updated 5 packages

OpenEXR-2.4.2-1

pam-1.4.0-1

python-pillow-7.2.0-1

python-qt5-5.12.3-3

sane-1.0.30-1

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.30
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/c3dd60c9e054b5dee1e7b01a7edc98b0/sane-backends-1.0.30.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* Thu Jul 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.30-1
290- new upstream release.
291
292* Mon May 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.29-1
293- new upstream release.
294- dropped Patch0.
295- added xinetd support.
296- added systemd support (disabled as default).
297
298* Wed May 18 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.25-1
299- new upstream release.
300- replace BR:libusb with BR:libusb1.
301
302* Mon Feb 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.24-2
303- rebuild with libgphoto2-2.5.7
304
305* Sun Feb 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.24-1
306- update to 1.0.24
307- update Patch0 (sane-1.0.24-vine.patch)
308- remove Patch1 (sane-backends-1.0.21-i18n.patch)
309- fix %%post and %%postun (fix BTS:2514)
310
311* Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 1.0.21-2
312- build with libghoto2 2.5.0-1
313- stop generating HTML manual: missing man2html(1) in current VineSeed
314- add Vendor and Distribution tags
315
316* Sun Jul 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.21-1
317- new upstream release
318- change Patch (from sane-1.0.15-vine.patch to sane-1.0.21-vine.patch)
319- move sane-config to devel package
320- add Requires: libjpeg-devel, libgphoto2-devel, libexif-devel, libusb-devel (devel package)
321- add Patch1(sane-backends-1.0.21-i18n.patch)
322
323* Sun Oct 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.18-3
324- added BuildRequires: libgphoto2-devel instead of ghoto2-devel
325
326* Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 1.0.18-2
327- spec in utf-8
328
329* Mon May 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.18-1
330- applied new versioning policy
331- removed lib*.la files from devel package
332
333* Mon Dec 24 2007 Shu KONNO <owa@bg.wakwak.com> 1.0.18-0vl1
334- new upstream release
335
336* Sun Jan 09 2005 Satoshi MACHINO <machino@vinelinux.org> 1.0.15-0vl1
337- new upstream version(sane-1.0.15)
338- fixed spec file
339        -- cleaned up patches
340        -- added Requires:       libjpeg, libusb
341        -- added BuildRequires:  glibc, libjpeg-devel, libusb-devel
342
343* Fri Oct 25 2002 Tomoya TAKA <taka@vinelinux.org> 1.0.8-0vl1
344- new upstream release
345- update sane-1.0.8-vine.patch
346- add --enable-static option to %%configure
347
348* Mon May 13 2002 Masaki Shinomiya <shino@pos.to>
349- 1.0.7-0vl2: sparc.patch, ppc.patch both from Mandrake(4mdk)
350- informed by Iohara [VinePlus:01130]
351
352* Thu Apr 4 2002 Masaki Shinomiya <shino@pos.to>
353- 1.0.7-0vl1 for Vine Linux-2.x
354- 1.0.7-0.1
355- set %_sysconfdir to /etc for RedHat6.x/Vine2.x
356
357* Wed Mar 6 2002 Masaki SHINOMIYA <shino@pos.to>
358- 1.0.7-0
359- new source
360- avoid listing %{_libdir}/sane from sane-devel
361- add LEVEL2 in doc
362
363* Fri Feb 1 2002 Masaki SHINOMIYA <shino@pos.to>
364- 1.0.6-0.3
365- allow to build without latex2html
366- prereq ldconfig, buildprereq sed, provide sane-backends
367
368* Sun Dec 23 2001 Masaki SHINOMIYA <shino@pos.to>
369- 1.0.6-0.2
370- dll.conf, epson.conf, network settings
371
372* Tue Dec 18 2001 Masaki SHINOMIYA <shino@pos.to>
373- 1.0.6-0.1
374- new source
375
376* Mon Dec 17 2001 Masaki SHINOMIYA <shino@pos.to>
377- 1.0.5-1.3
378- allow to use emacs or xemacs in building
379- nosrc
380
381#* Wed Oct 3 2001 Masaki SHINOMIYA <shino@pos.to>
382#- 1.0.5-1.2
383#- surpress swapping R<-->G colors on EPSON GT-8700/Perfection1640
384#- ( information from [vine-users:037559] tyu <tyu@mbd.nifty.com> )
385#- omit doc/*.tex etc.
386
387* Tue Sep 18 2001 Masaki SHINOMIYA <shino@pos.to>
388- 1.0.5-1.1
389- use emacs instead of xemacs in building
390
391* Sat Jul 7 2001 Masaki SHINOMIYA <shino@pos.to>
392- 1.0.5-1
393
394* Thu Jun 7 2001 Masaki SHINOMIYA <shino@pos.to>
395- 1.0.4 + epson backend ver.20010519
396- sane-clients is removed from this package
397- scanimage, find-scanner and xerox are left in this package
398
399* Thu May 17 2001 Masaki SHINOMIYA <shino@pos.to>
400- 1.0.4 + epson backend ver.20010331
401- 'scanimage' is included in the binary'sane-1.0.4-1.i386.rpm'package.
402- refined script for gimp plug-in setup
403- html documents shal be installed in the directory '/usr/share/sane'
404- automatically make device the file /dev/usb/scanner0
405
406* Wed Nov 15 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
407- 1.0.3-0vl8
408- included missing "sane-config" script for sane
409
410* Tue Oct 17 2000 Jun Nishii <jun@vinelinux.org>
411- 1.0.3-0vl7
412- merge xscanimage patch
413
414* Mon Oct 16 2000 Jun Nishii <jun@vinelinux.org>
415- 1.0.3-0vl6
416- build with gimp-1.1.27
417
418* Sun Oct  1 2000 Jun Nishii <jun@vinelinux.org>
419- 1.0.3-0vl5
420- fixed group
421
422* Sat Sep 30 2000 Jun Nishii <jun@vinelinux.org>
423- 1.0.3-0vl4
424- added %defattr in clients
425
426* Tue Sep 26 2000 Jun Nishii <jun@vinelinux.org>
427- 1.0.3-0vl3
428- build with gimp-1.1.26
429
430* Mon Sep 25 2000 Jun Nishii <jun@vinelinux.org>
431- 1.0.3-0vl2
432- build with gimp-1.1.25
433
434* Thu Sep 21 2000 Jun Nishii <jun@vinelinux.org>
435- 1.0.3-0vl1
436
437* Thu Jun  8 2000 Jun Nishii <jun@vinelinux.org>
438- 1.0.2-0vl1
439
440* Mon Jan 17 2000 Jun Nishii <jun@vinelinux.org>
441- build for Vine Linux 2.0
442- added find-scanner, xerox
443
444* Fri Apr 23 1999 Hugo van der Kooij <hvdkooij@caiw.nl>
445- Fixed packaging a bit.
446
447* Wed Apr 21 1999 Hugo van der Kooij <hvdkooij@caiw.nl>
448- Updated package to 1.01
449
450* Fri Apr 09 1999 Hugo van der Kooij <hvdkooij@caiw.nl>
451- Split off the clients
452- Fixed a Alpha system anomaly by removing the specific backend.
453
454* Mon Nov 23 1998 Jonathan Miller <jlm@mvhi.com>
455 [1.00-1]
456- upgraded to 1.00 (and made description less space-consuming)
457- included the post 1.00 fixed "configure" script available 22 Nov 1998.
458
459* Sat Aug 08 1998 Arne Coucheron <arneco@online.no>
460  [0.74-3]
461- added /etc/sane.d to %dir in file list
462
463* Sat Aug 01 1998 Arne Coucheron <arneco@online.no>
464  [0.74-2]
465- devel Group: reverted back to Development/Libraries
466- some changes to the %defattr and %attr usage in file list
467
468* Tue Jul 28 1998 Binaire <binaire@binaire.ml.org>
469  [0.74-1]
470
471* Fri May 22 1998 Arne Coucheron <arneco@online.no>
472  [0.73-3]
473- added use of %%{name} and %%{version} macros
474- added a %postun for running ldconfig after uninstall
475- using BuildRoot properly now
476- using %defattr and %attr macros in filelist, allows non-root build
477  this means that RPM 2.5 is required to build this spec file now!
478- devel Group: changed to X11/Libraries
479- added using RPM_OPT_FLAGS during make
480- added striping of programs and libraries
481- added Requires: gtk+ >= 0.99.13 to main package
482- added Requires: %%{name} = %%{version} to devel package
483- added a %clean section for removing the buildroot dir
484- simplified the filelist and added %config for sane-style.rc
485- moved lib*.so to %files devel and dropped the *.la files
486- added -q parameter to %setup
487- removed some older changelog entries
488- removed the "fix ldconfig brokenness..." stuff
489- removed the Packager: line; use /etc/rpmrc if you want your name in
490- if GIMP is installed, make symlink from xscanimage to plug-ins dir
491- install the find-scanner program from the tools dir
492
493* Mon May 18 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
494- Version 0.73 was created: May 13 1998
495- gimp (original was build against 0.99.29)
496- gtk+ (original was build against 1.0.1)
497- dlh (original was build against 0.7d)
498- X11 development tree including xpm libraries.
499
500* Wed Apr 22 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
501- Binaries are now BuildRoot proof.
502
503* Wed Apr 22 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
504- Binaries are not BuildRoot proof. release 3 is done without BuildRoot!
505
506* Tue Apr 21 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
507- Temp. fix for some documentations problems with BuildRoot.
508
509* Sat Apr 11 1998 Hugo van der Kooij <hvdkooij@caiw.nl>
510- Formal 0.72 now made as RPM! (Build against GTK+ 0.99.10 and GIMP 0.99.24)
511- Original package was released: Tue Apr 7 1998
Note: See TracBrowser for help on using the repository browser.