]> git.pld-linux.org Git - packages/sane-backends.git/blob - sane-backends.spec
- unified rc-inetd usage (via %service), adapterized
[packages/sane-backends.git] / sane-backends.spec
1 #
2 # Conditional build:
3 %bcond_without  gphoto  # no gphoto backend (which requires libgphoto2)
4 %bcond_without  lpt     # no parallel port backends (which require libieee1284)
5 %bcond_without  rts88xx # rts88xx scanner support (hp4400/4470)
6 #
7 # XXX: really only x86*?
8 %ifnarch %{ix86} %{x8664}
9 %undefine       with_lpt
10 %endif
11 Summary:        SANE - easy local and networked scanner access
12 Summary(es):    SANE - acceso a scanners en red y locales
13 Summary(ko):    ½ºÄ³³Ê¸¦ ´Ù·ç´Â ¼ÒÇÁÆ®¿þ¾î
14 Summary(pl):    SANE - prosta obs³uga skanerów lokalnych i sieciowych
15 Summary(pt_BR): SANE - acesso a scanners locais e em rede
16 Name:           sane-backends
17 Version:        1.0.17
18 Release:        1
19 License:        relaxed LGPL (libraries), and Public Domain (docs)
20 Group:          Libraries
21 Source0:        ftp://ftp.sane-project.org/pub/sane/%{name}-%{version}/sane-backends-%{version}.tar.gz
22 # Source0-md5:  b51c10da8a81a04e1bae88c9e6556df2
23 Source1:        %{name}.rc-inetd
24 Source2:        %{name}.m4
25 # http://hp44x0backend.sourceforge.net/
26 Source3:        http://dl.sourceforge.net/hp44x0backend/sane_hp_rts88xx-0.17n.tar.gz
27 # Source3-md5:  01cae741a347fc73eeaf32aeb731d9af
28 #Source3:       http://home.foni.net/~johanneshub/sane_hp_rts88xx-0.17k.tar.gz
29 Patch1:         %{name}-mustek-path.patch
30 Patch2:         %{name}-spatc.patch
31 Patch3:         %{name}-link.patch
32 Patch4:         %{name}-pmake.patch
33 Patch5:         %{name}-locale-names.patch
34 Patch6:         %{name}-hp_rts88xx-fixes.patch
35 Patch7:         %{name}-pl.po-update.patch
36 URL:            http://www.sane-project.org/
37 BuildRequires:  autoconf >= 2.54
38 BuildRequires:  automake
39 BuildRequires:  gettext-devel
40 %{?with_gphoto:BuildRequires:   libgphoto2-devel >= 2.0.1}
41 %{?with_lpt:BuildRequires:      libieee1284-devel}
42 BuildRequires:  libjpeg-devel
43 BuildRequires:  libtool
44 BuildRequires:  libusb-devel
45 BuildRequires:  pkgconfig
46 BuildRequires:  resmgr-devel
47 BuildRequires:  rpmbuild(macros) >= 1.268
48 BuildRequires:  tetex-dvips
49 BuildRequires:  tetex-latex
50 BuildRequires:  tetex-latex-psnfss
51 Requires:       setup >= 2.4.10-1
52 Obsoletes:      sane
53 Obsoletes:      sane-backends-sm3600
54 Conflicts:      sane-backends-plustek
55 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57 %description
58 SANE (Scanner Access Now Easy) is a sane and simple interface to both
59 local and networked scanners and other image acquisition devices like
60 digital still and video cameras. SANE currently includes modules for
61 accessing:
62
63 Scanners: Abaton, Agfa, Apple, Artec, Avision, Bell+Howell, Canon,
64 Epson, Fujitsu, HP, LEO, Microtek, Mustek, NEC, Nikon, Panasonic, PIE,
65 Plustek, Ricoh, Sceptre, Sharp, Siemens, Tamarack, Teco, UMAX
66
67 Digital cameras: Kodak, Polaroid, Connectix QuickCam
68
69 and other SANE devices via network.
70
71 %description -l es
72 SANE - acceso a scanners en red y locales.
73
74 %description -l pl
75 SANE (Scanner Access Now Easy) jest rozs±dnym i prostym insterfejsem
76 do skanerów, zarówno lokalnych jak i sieciowych, oraz innych urz±dzeñ
77 do pozyskiwania obrazów, jak cyfrowe aparaty i kamery. SANE aktualnie
78 zawiera modu³y do obs³ugi:
79
80 Skanery: Abaton, Agfa, Apple, Artec, Avision, Bell+Howell, Canon,
81 Epson, Fujitsu, HP, LEO, Microtek, Mustek, NEC, Nikon, Panasonic, PIE,
82 Plustek, Ricoh, Sceptre, Sharp, Siemens, Tamarack, Teco, UMAX
83
84 Aparaty cyfrowe: Kodak, Polaroid, Connectix QuickCam
85
86 oraz inne urz±dzenia dostêpne przez sieæ.
87
88 %description -l pt_BR
89 O SANE (Scanner Access Now Easy) é uma interface simples para scanners
90 e outros dispositivos de captura de imagens como câmeras fotográficas
91 digitais e de vídeo conectados diretamente ou através da rede.
92
93 %package devel
94 Summary:        Development part of SANE
95 Summary(es):    Archivos necesarios para el desarrollo de programas que usen SANE
96 Summary(pl):    Czê¶æ SANE przeznaczona dla programistów
97 Summary(pt_BR): Arquivos necessários ao desenvolvimento de programas que usem o SANE
98 Group:          Development/Libraries
99 Requires:       %{name} = %{version}-%{release}
100 Obsoletes:      sane-backends-sane-devel
101 Obsoletes:      sane-backends-sane-static
102
103 %description devel
104 Development part of SANE.
105
106 %description devel -l es
107 Archivos necesarios para el desarrollo de programas que usen SANE.
108
109 %description devel -l pl
110 Czê¶æ SANE dla programistów.
111
112 %description devel -l pt_BR
113 Arquivos necessários ao desenvolvimento de programas que usem o SANE.
114
115 %package static
116 Summary:        Static SANE libraries
117 Summary(pl):    Statyczne biblioteki SANE
118 Summary(pt_BR): Ferramentas de desenvolvimento para o SANE (bibliotecas estáticas)
119 Group:          Development/Libraries
120 Requires:       %{name}-devel = %{version}-%{release}
121 Obsoletes:      sane-backends-sane-static
122
123 %description static
124 Static SANE libraries.
125
126 %description static -l pl
127 Biblioteki statyczne SANE.
128
129 %description static -l pt_BR
130 Bibliotecas estáticas para desenvolvimento de módulos do SANE.
131
132 %package saned
133 Summary:        SANE network daemon
134 Summary(pl):    Demon sieciowy SANE
135 Group:          Networking/Daemons
136 Requires(post,postun):  /sbin/ldconfig
137 Requires(pre):  /bin/id
138 Requires(pre):  /usr/bin/getgid
139 Requires(pre):  /usr/sbin/groupadd
140 Requires(pre):  /usr/sbin/useradd
141 Requires(preun):        /usr/sbin/groupdel
142 Requires(preun):        /usr/sbin/userdel
143 Requires:       %{name} = %{version}-%{release}
144 Requires:       rc-inetd
145 Provides:       group(saned)
146 Provides:       user(saned)
147
148 %description saned
149 saned is the SANE (Scanner Access Now Easy) daemon that allows remote
150 clients to access image acquisition devices available on the local
151 host.
152
153 %description saned -l pl
154 saned to demon SANE pozwalaj±cy zdalnym klientom na dostêp do urz±dzeñ
155 odczytuj±cych obraz pod³±czonych lokalnie.
156
157 %package -n sane-mustek600IIN
158 Summary:        Mustek 600 II N scanner tool
159 Summary(pl):    Narzêdzie do skanera Mustek 600 II N
160 Group:          Applications/System
161 Requires:       %{name} = %{version}-%{release}
162
163 %description -n sane-mustek600IIN
164 Tool which turns Mustek 600 II N scanner off. Sometimes scanner hangs
165 and can't be turned off by (x)scanimage in normal way.
166
167 Note: this program needs root privileges or access to /dev/port.
168
169 %description -n sane-mustek600IIN -l pl
170 Narzêdzie wymuszaj±ce wy³±czenie skanera Mustek 600 II N. Czasem
171 skaner zawiesza siê i nie jest mo¿liwe wy³±czenie go zwyk³ym sposobem
172 przez program (x)scanimage.
173
174 Ten program wymaga uprawnieñ roota albo dostêpu do /dev/port.
175
176 %package gphoto2
177 Summary:        SANE backend for gphoto2 supported cameras
178 Summary(pl):    Sterownik SANE do aparatów obs³ugiwanych przez gphoto2
179 Group:          Applications/System
180 Requires:       %{name} = %{version}-%{release}
181
182 %description gphoto2
183 SANE backend for gphoto2 supported cameras.
184
185 %description gphoto2 -l pl
186 Sterownik SANE do aparatów obs³ugiwanych przez gphoto2.
187
188 %package pp
189 Summary:        SANE backends for parallel port scanners
190 Summary(pl):    Starowniki SANE dla skanerów pod³±czanych do portu równoleg³ego
191 Group:          Applications/System
192 Requires:       %{name} = %{version}-%{release}
193 Obsoletes:      sane-backends-canon_pp
194 Obsoletes:      sane-backends-hpsj5s
195 # in case sb used parport scanner
196 Obsoletes:      kernel-char-plustek
197 Obsoletes:      kernel-smp-char-plustek
198 Obsoletes:      sane-backends-plustek
199
200 %description pp
201 SANE backends for parallel port scanners. It includes the following
202 drivers:
203 - canon_pp (Canon CanoScan FBxxxP, CanoScan NxxxP)
204 - hpsj5s (HP ScanJet 5S)
205 - mustek_pp (Mustek CIS and CCD scanners)
206 - plustek_pp (Plustek)
207
208 %description pp -l pl
209 Starowniki SANE dla skanerów pod³±czanych do portu równoleg³ego:
210 - canon_pp (Canon CanoScan FBxxxP, CanoScan NxxxP)
211 - hpsj5s (HP ScanJet 5S)
212 - mustek_pp (skanery Mustek CIS i CCD)
213 - plustek_pp (Plustek)
214
215 %prep
216 %setup -q -a3
217 # kill libtool.m4 copy
218 grep -B 100000 'libtool.m4 - Configure libtool for the host system' acinclude.m4 > acinclude.m4.tmp
219 mv -f acinclude.m4.tmp acinclude.m4
220 %patch1 -p1
221 %patch2 -p1
222 %patch3 -p1
223 %patch4 -p1
224 %patch5 -p1
225 %if %{with rts88xx}
226 %patch6 -p1
227 cd sane_hp_rts88xx/sane_hp_rts88xx
228 sh -x patch-sane.sh `pwd`/../..
229 cd ../..
230 %endif
231 %patch7 -p1
232 mv -f po/sane-backends.{no,nb}.po
233
234 %build
235 %{__libtoolize}
236 %{__aclocal}
237 %{__autoconf}
238 %configure \
239         --enable-static \
240         --enable-pnm-backend \
241         --enable-translations \
242         %{?with_gphoto:--with-gphoto2}
243
244 %{__make}
245
246 %ifarch %{ix86}
247 cd tools
248 %{__cc} -DHAVE_SYS_IO_H %{rpmcflags} \
249         -I../include -o mustek600iin-off mustek600iin-off.c
250 cd ..
251 %endif
252
253 %install
254 rm -rf $RPM_BUILD_ROOT
255 install -d $RPM_BUILD_ROOT{/etc/sysconfig/rc-inetd,%{_aclocaldir},/var/lock/sane}
256
257 %{__make} install \
258         DESTDIR=$RPM_BUILD_ROOT
259
260 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/saned
261 install %{SOURCE2} $RPM_BUILD_ROOT%{_aclocaldir}
262
263 %ifarch %{ix86}
264 install tools/mustek600iin-off $RPM_BUILD_ROOT%{_bindir}
265 %endif
266
267 rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
268
269 # only shared modules - shut up check-files
270 rm -f $RPM_BUILD_ROOT%{_libdir}/sane/libsane-*.{so,la,a}
271
272 %find_lang %{name} --all-name
273
274 %clean
275 rm -rf $RPM_BUILD_ROOT
276
277 %post   -p /sbin/ldconfig
278 %postun -p /sbin/ldconfig
279
280 %pre saned
281 %groupadd -g 90 saned
282 %useradd -u 90 -d /usr/share/empty -s /bin/false -c "SANE remote scanning daemon" -g saned saned
283
284 %post saned
285 %service -q rc-inetd reload
286
287 %postun saned
288 if [ "$1" = "0" ]; then
289         %service -q rc-inetd reload
290         %userremove saned
291         %groupremove saned
292 fi
293
294 %files -f %{name}.lang
295 %defattr(644,root,root,755)
296 %doc AUTHORS ChangeLog LICENSE NEWS PROBLEMS PROJECTS README README.linux
297 %doc doc/canon doc/gt68xx doc/leo doc/matsushita doc/mustek doc/mustek_usb
298 %doc doc/plustek doc/sceptre doc/teco doc/umax
299 %dir %{_sysconfdir}/sane.d
300 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/[!cghmp]*
301 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/c[!a]*
302 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/canon.conf
303 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/canon630u.conf
304 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/genesys.conf
305 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/gt68xx.conf
306 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/hp.conf
307 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/hp4200.conf
308 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/hp5400.conf
309 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/m[!u]*
310 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/mustek.conf
311 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/mustek_usb.conf
312 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/p[!l]*
313 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/plustek.conf
314 %{?with_rts88xx:%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/hp_rt* }
315 %dir %{_libdir}/sane
316 %attr(755,root,root) %{_libdir}/lib*.so.*.*
317 %attr(755,root,root) %{_libdir}/sane/libsane-[!cghmp]*.so.*
318 %attr(755,root,root) %{_libdir}/sane/libsane-c[!a]*.so.*
319 %attr(755,root,root) %{_libdir}/sane/libsane-canon.so.*
320 %attr(755,root,root) %{_libdir}/sane/libsane-canon630u.so.*
321 %attr(755,root,root) %{_libdir}/sane/libsane-genesys.so.*
322 %attr(755,root,root) %{_libdir}/sane/libsane-gt68xx.so.*
323 %attr(755,root,root) %{_libdir}/sane/libsane-hp.so.*
324 %attr(755,root,root) %{_libdir}/sane/libsane-hp4200.so.*
325 %attr(755,root,root) %{_libdir}/sane/libsane-hp5400.so.*
326 %attr(755,root,root) %{_libdir}/sane/libsane-m[!u]*.so.*
327 %attr(755,root,root) %{_libdir}/sane/libsane-mustek.so.*
328 %attr(755,root,root) %{_libdir}/sane/libsane-mustek_usb.so.*
329 %attr(755,root,root) %{_libdir}/sane/libsane-mustek_usb2.so.*
330 %attr(755,root,root) %{_libdir}/sane/libsane-p[!l]*.so.*
331 %attr(755,root,root) %{_libdir}/sane/libsane-plustek.so.*
332 %{?with_rts88xx:%attr(755,root,root) %{_libdir}/sane/libsane-hp_rts88xx.so.* }
333 %attr(755,root,root) %{_bindir}/sane-find-scanner
334 %attr(755,root,root) %{_bindir}/scanimage
335 %attr(755,root,root) %{_bindir}/gamma4scanimage
336 %dir %attr(775,root,usb) /var/lock/sane
337 %{_mandir}/man1/sane-find-scanner.1*
338 %{_mandir}/man1/scanimage.1*
339 %{_mandir}/man1/gamma4scanimage.1*
340 %{_mandir}/man1/sane-config.1*
341 %{_mandir}/man5/sane-[!cghmp]*
342 %{_mandir}/man5/sane-c[!a]*
343 %{_mandir}/man5/sane-canon.5*
344 %{_mandir}/man5/sane-canon630u.5*
345 %{_mandir}/man5/sane-genesys.5*
346 %{_mandir}/man5/sane-gt68xx.5*
347 %{_mandir}/man5/sane-hp.5*
348 %{_mandir}/man5/sane-hp4200.5*
349 %{_mandir}/man5/sane-hp5400.5*
350 %{_mandir}/man5/sane-m[!u]*
351 %{_mandir}/man5/sane-mustek.5*
352 %{_mandir}/man5/sane-mustek_usb.5*
353 %{_mandir}/man5/sane-mustek_usb2.5*
354 %{_mandir}/man5/sane-p[!l]*
355 %{_mandir}/man5/sane-plustek.5*
356 %{?with_rts88xx:%{_mandir}/man5/sane-hp_rts88xx* }
357 %{_mandir}/man7/*
358
359 %files devel
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_bindir}/sane-config
362 %attr(755,root,root) %{_libdir}/*.so
363 %{_libdir}/*.la
364 %{_includedir}/sane
365 %{_aclocaldir}/*.m4
366
367 %files static
368 %defattr(644,root,root,755)
369 %{_libdir}/lib*.a
370
371 %files saned
372 %defattr(644,root,root,755)
373 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/saned
374 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/saned.conf
375 %attr(755,root,root) %{_sbindir}/saned
376 %{_mandir}/man8/saned.8*
377
378 %ifarch %{ix86}
379 %files -n sane-mustek600IIN
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_bindir}/mustek600iin-off
382 %endif
383
384 %if %{with gphoto}
385 %files gphoto2
386 %defattr(644,root,root,755)
387 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/gphoto2.conf
388 %attr(755,root,root) %{_libdir}/sane/libsane-gphoto2.so.*
389 %{_mandir}/man5/sane-gphoto2.5*
390 %endif
391
392 %if %{with lpt}
393 %files pp
394 %defattr(644,root,root,755)
395 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/canon_pp.conf
396 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/hpsj5s.conf
397 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/mustek_pp.conf
398 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sane.d/plustek_pp.conf
399 %attr(755,root,root) %{_libdir}/sane/libsane-canon_pp.so.*
400 %attr(755,root,root) %{_libdir}/sane/libsane-hpsj5s.so.*
401 %attr(755,root,root) %{_libdir}/sane/libsane-mustek_pp.so.*
402 %attr(755,root,root) %{_libdir}/sane/libsane-plustek_pp.so.*
403 %{_mandir}/man5/sane-canon_pp.5*
404 %{_mandir}/man5/sane-hpsj5s.5*
405 %{_mandir}/man5/sane-mustek_pp.5*
406 %{_mandir}/man5/sane-plustek_pp.5*
407 %endif
This page took 0.067122 seconds and 3 git commands to generate.