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