/[packages]/cauldron/sane/current/SPECS/sane.spec
ViewVC logotype

Contents of /cauldron/sane/current/SPECS/sane.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 24948 - (show annotations) (download)
Wed Jan 19 22:29:38 2011 UTC (13 years, 3 months ago) by ahmad
File size: 21043 byte(s)
- drop old/unneeded scriptlets
- use generic sane-backends requires

1 %define name sane
2 %define version 1.0.21
3 %define release %mkrel 6
4 %define beta %nil
5 #define beta -pre1
6 #define beta .20080121
7
8 %define libmajor 1
9 %define libname %mklibname %{name} %{libmajor}
10 %define libname_devel %mklibname %{name} %{libmajor} -d
11
12 %define iscanversion 2.24.0
13
14 # All sane backends have SONAME libsane.so.1. We do not want
15 # sane-backends-iscan to provide libsane.so.1, so filter these out.
16 %define _exclude_files_from_autoprov %{_libdir}/%{name}/
17 %define __libtoolize /bin/true
18
19 # Setting this makes the /etc/sane.d/dll.conf empty so that scanning apps
20 # do not search for all existing scanner models which makes their startup
21 # slow (the user or "scannerdrake" has to insert the names of the really
22 # installed scanners then)
23 %define empty_dll_conf 0
24
25 %define gphoto2_support 1
26 %define v4l_support 1
27 # Switch to disable the compilation of the "primax" backend in case of
28 # problems
29 %define primax_support 1
30 # Switch to disable the compilation of the "epkowa" backend in case of
31 # problems
32 %define epkowa_support 1
33 %ifarch alpha ppc sparc %arm %mips
34 %define primax_support 0
35 %define epkowa_support 0
36 %endif
37
38 Name: %{name}
39 Version: %{version}
40 Release: %{release}
41 Summary: SANE - local and remote scanner access
42 URL: http://www.sane-project.org/
43 Source: ftp://ftp.sane-project.org/pub/sane/sane-%version/sane-backends-%{version}%{beta}.tar.gz
44 Source3: http://belnet.dl.sourceforge.net/sourceforge/px-backend/primaxscan-1.1.beta1.tar.bz2
45 Source5: saned-xinetd
46 Source9: http://heanet.dl.sourceforge.net/sourceforge/hp44x0backend/sane_hp_rts88xx-0.18.tar.bz2
47 Source10: http://heanet.dl.sourceforge.net/sourceforge/brother-mfc/sane-driver-0.2.tar.bz2
48 Source11: http://www.geocities.com/trsh0101/SANE/primascan.h
49 Source12: http://www.geocities.com/trsh0101/SANE/primascan.c
50 # The free part of Epson's scanner driver package IScan, full package
51 # downloaded from http://www.avasys.jp/english/linux_e/index.html
52 # Non-free part stripped out with
53 # mkdir x; cd x; tar -xvzf ../iscan_2.21.0-6.tar.gz; rm -f */non-free/EAPL*.txt */non-free/lib*.so; tar -cvjf ../iscan_2.21.0-6-free.tar.bz2 *; cd ..; rm -rf x
54 Source13: iscan_%{iscanversion}-4-free.tar.bz2
55 Source14: http://downloads.sourceforge.net/project/geniusvp2/sane-backend-geniusvp2/1.0.16.1/sane-backend-geniusvp2_1.0.16.1.tar.gz
56 Patch0: sane-backends-1.0.19-fix-str-fmt.patch
57 Patch1: sane-backends-1.0.18-plustek-s12.patch
58 Patch9: sane-sparc.patch
59 #Patch20: http://projects.troy.rollo.name/rt-scanners/hp3500.diff
60 Patch21: sane-hp_rts88xx-0.18_fix_link.patch
61 Patch23: iscan-2.10.0-1_fix_link.patch
62 Patch24: sane-backends-1.0.21-link.patch
63 Patch26: iscan-2.20.1-no_non-free_please.diff
64 Patch27: iscan-2.20.1-linkage_fix.patch
65 # (fc) 1.0.19-12mdv fix group for device
66 Patch28: sane-backends-1.0.20-group.patch
67 # (fc) 1.0.20-1mdv primascan build support
68 Patch29: sane-backends-1.0.21-primascan.patch
69 # (fc) list Brother MFC-260C, DCP130C as supported (Mdv bug # 52951)
70 Patch30: sane-backends-1.0.20-brother2list.patch
71 Patch31: sane-backends-1.0.20-strformat.patch
72
73 # Debian patches
74 # new build system breaks build when using pthreads.
75 Patch101: 01_missing_pthreads.dpatch
76 # only link the frontends with the libraries they need.
77 Patch102: 02_frontends_libs.dpatch
78 # reduce libsane.so deps to the bare minimum.
79 Patch103: 03_libsane_deps.dpatch
80 # add back SANE_CAP_ALWAYS_SETTABLE which was mistakenly
81 # removed from SANE 1.0.20
82 Patch106: 06_cap_always_settable.dpatch
83 # Update es translation and add new gl translation, courtesy of
84 # Miguel Bouzada <mbouzada@gmail.com>.
85 Patch109: 09_po_update_es_add_gl.dpatch
86 # Use fedora's patch to remove rpath
87 #Patch111: 20_disable_rpath.dpatch
88 #Patch112: 21_sane-config.in_no_rpath.dpatch
89 # Patch to the dll backend to look for pieces of dll.conf inside the
90 # /etc/sane.d/dll.d/ directory. This is a facility for packages providing
91 # external backends (like libsane-extras, hpoj and hplip).
92 Patch113: 22_dll_backend_conf.dpatch
93 # do not install OS-specific READMEs.
94 Patch114: 23_unneeded_doc.dpatch
95 Patch115: 24_sane-desc.c_debian_mods.dpatch
96 # use ubuntu udev rules
97 Patch118: ubuntu_udev_noperm.dpatch
98
99 # Fedora patches
100 Patch202: sane-backends-1.0.20-open-macro.patch
101 Patch203: sane-backends-1.0.20-hal.patch
102 Patch205: sane-backends-1.0.20-epson-expression800.patch
103
104 # lib/ is LGPLv2+, backends are GPLv2+ with exceptions
105 # Tools are GPLv2+, docs are public domain
106 License: GPLv2+ and GPLv2+ with exceptions and Public Domain
107 Group: Graphics
108 Requires: %{libname} = %{version}-%{release}
109 Requires: sane-backends = %{version}-%{release}
110 Buildroot: %{_tmppath}/%{name}-%{version}-root
111 BuildRequires: X11-devel libjpeg-devel tetex-latex tetex-dvips libtiff-devel libusb-devel >= 0.1.6 libieee1284-devel
112 BuildRequires: udev-tools libgtk+2.0-devel
113 BuildRequires: gettext
114 BuildRequires: gettext-devel
115 %if %{gphoto2_support}
116 BuildRequires: gphoto2-devel
117 %endif
118 %if %{v4l_support}
119 BuildRequires: libv4l-devel
120 %endif
121 %if %{epkowa_support}
122 BuildRequires: autoconf
123 %endif
124 # ensure resmgr is not pulled
125 BuildConflicts: resmgr-devel
126
127 %description
128 SANE (Scanner Access Now Easy) is a sane and simple interface
129 to both local and networked scanners and other image acquisition devices
130 like digital still and video cameras. SANE currently includes modules for
131 accessing a range of scanners, including models from Agfa SnapScan, Apple,
132 Artec, Canon, CoolScan, Epson, HP, Microtek, Mustek, Nikon, Siemens,
133 Tamarack, UMAX, Connectix, QuickCams and other SANE devices via network.
134
135 For the latest information on SANE, the SANE standard definition, and
136 mailing list access, see http://www.mostang.com/sane/
137
138 This package does not enable network scanning by default; if you wish
139 to enable it, install the saned package.
140
141 %package -n %{libname}
142 Group: System/Kernel and hardware
143 License: LGPL
144 Summary: SANE - local and remote scanner access. This package contains the sane library
145 Provides: libsane = %{version}-%{release}
146
147 %description -n %{libname}
148 SANE (Scanner Access Now Easy) is a sane and simple interface
149 to both local and networked scanners and other image acquisition devices
150 like digital still and video cameras. SANE currently includes modules for
151 accessing a range of scanners, including models from Agfa SnapScan, Apple,
152 Artec, Canon, CoolScan, Epson, HP, Microtek, Mustek, Nikon, Siemens,
153 Tamarack, UMAX, Connectix, QuickCams and other SANE devices via network.
154
155 For the latest information on SANE, the SANE standard definition, and
156 mailing list access, see http://www.mostang.com/sane/
157
158 This package does not enable network scanning by default; if you wish
159 to enable it, install the saned package.
160
161 %package -n %{libname_devel}
162 Group: Development/C
163 License: LGPL
164 Summary: SANE - local and remote scanner access
165 Requires: %{libname} = %{version}
166 Provides: libsane-devel = %{version}-%{release}
167 Provides: sane-devel = %{version}-%{release}
168 Obsoletes: sane-devel
169
170 %description -n %{libname_devel}
171 SANE (Scanner Access Now Easy) is a sane and simple interface
172 to both local and networked scanners and other image acquisition devices
173 like digital still and video cameras. SANE currently includes modules for
174 accessing a range of scanners, including models from Agfa SnapScan, Apple,
175 Artec, Canon, CoolScan, Epson, HP, Microtek, Mustek, Nikon, Siemens,
176 Tamarack, UMAX, Connectix, QuickCams and other SANE devices via network.
177
178 For the latest information on SANE, the SANE standard definition, and
179 mailing list access, see http://www.mostang.com/sane/
180
181 This package contains the headers and development libraries necessary
182 to develop applications using SANE.
183
184 %package backends
185 Group: System/Kernel and hardware
186 License: LGPL
187 Summary: SANE - local and remote scanner access
188 Provides: %{name} = %{version}-%{release}
189 %if %epkowa_support
190 Suggests: iscan
191 %endif
192
193 %description backends
194 SANE (Scanner Access Now Easy) is a sane and simple interface
195 to both local and networked scanners and other image acquisition devices
196 like digital still and video cameras. SANE currently includes modules for
197 accessing a range of scanners, including models from Agfa SnapScan, Apple,
198 Artec, Canon, CoolScan, Epson, HP, Microtek, Mustek, Nikon, Siemens,
199 Tamarack, UMAX, Connectix, QuickCams and other SANE devices via network.
200
201 For the latest information on SANE, the SANE standard definition, and
202 mailing list access, see http://www.mostang.com/sane/
203
204 This package does not enable network scanning by default; if you wish
205 to enable it, install the saned package and set up the sane-net backend.
206 This package contains the backends for different scanners.
207
208 %if %epkowa_support
209 %package backends-iscan
210 Group: System/Kernel and hardware
211 License: LGPL
212 Summary: SANE - local and remote scanner access
213 Provides: iscan = %{iscanversion}
214 Conflicts: sane-backends < 1.0.19-3
215 Conflicts: %{libname} < 1.0.19-5
216 Conflicts: %{libname_devel} < 1.0.20-7
217
218 %description backends-iscan
219 SANE (Scanner Access Now Easy) is a sane and simple interface
220 to both local and networked scanners and other image acquisition devices
221 like digital still and video cameras. SANE currently includes modules for
222 accessing a range of scanners, including models from Agfa SnapScan, Apple,
223 Artec, Canon, CoolScan, Epson, HP, Microtek, Mustek, Nikon, Siemens,
224 Tamarack, UMAX, Connectix, QuickCams and other SANE devices via network.
225
226 For the latest information on SANE, the SANE standard definition, and
227 mailing list access, see http://www.mostang.com/sane/
228
229 This package does not enable network scanning by default; if you wish
230 to enable it, install the saned package and set up the sane-net backend.
231
232 This package contains the iscan backend, in order to not conflict with
233 manufacturer-supplied packages.
234 %endif
235
236 %package backends-doc
237 Summary: Documentation for SANE backends
238 Group: System/Kernel and hardware
239
240 %description backends-doc
241 This package contains the SANE backend documentation for different
242 scanners.
243
244 SANE (Scanner Access Now Easy) is a sane and simple interface
245 to both local and networked scanners and other image acquisition devices
246 like digital still and video cameras. SANE currently includes modules for
247 accessing a range of scanners, including models from Agfa SnapScan, Apple,
248 Artec, Canon, CoolScan, Epson, HP, Microtek, Mustek, Nikon, Siemens,
249 Tamarack, UMAX, Connectix, QuickCams and other SANE devices via network.
250
251 For the latest information on SANE, the SANE standard definition, and
252 mailing list access, see http://www.mostang.com/sane/
253
254 This package does not enable network scanning by default; if you wish
255 to enable it, install the saned package and set up the sane-net backend.
256
257 %package -n saned
258 Group: System/Kernel and hardware
259 License: LGPL
260 Summary: SANE - local and remote scanner access
261 Provides: %{name} = %{version}-%{release}
262 Provides: saned = %{version}-%{release}
263 Requires: sane-backends
264 Requires: xinetd
265 Requires(preun,post): rpm-helper
266
267 %description -n saned
268 SANE (Scanner Access Now Easy) is a sane and simple interface
269 to both local and networked scanners and other image acquisition devices
270 like digital still and video cameras. SANE currently includes modules for
271 accessing a range of scanners, including models from Agfa SnapScan, Apple,
272 Artec, Canon, CoolScan, Epson, HP, Microtek, Mustek, Nikon, Siemens,
273 Tamarack, UMAX, Connectix, QuickCams and other SANE devices via network.
274
275 For the latest information on SANE, the SANE standard definition, and
276 mailing list access, see http://www.mostang.com/sane/
277
278 This package contains saned, a daemon that allows remote clients to
279 access image acquisition devices available on the local host.
280
281 %prep
282 %setup -q -n sane-backends-%{version}%{beta}
283 %patch0 -p0 -b .string-format
284 %patch1 -p1 -b .plusteks12
285 %patch24 -p0 -b .link
286 %patch28 -p1 -b .group
287 %patch30 -p1 -b .brother2list
288 %patch31 -p1 -b .strformat
289
290 %patch101 -p1
291 %patch102 -p1
292 %patch103 -p1
293 %patch106 -p1
294 #%patch109 -p1
295 #%patch111 -p1
296 #%patch112 -p1
297 %patch113 -p1
298 %patch114 -p1
299 %patch115 -p1
300 %patch118 -p1 -b .ubuntu-udev
301
302 # Fedora patches
303 %patch202 -p1 -b .open-macro
304 #%patch203 -p1 -b .hal
305 %patch205 -p0 -b .epson-expression800
306
307
308 # Patches for non-x86 platforms
309 %ifarch sparc
310 %patch9 -p1 -b .sparc
311 %endif
312
313 # "geniusvp2" backend
314 #setup -q -T -D -a 14 -n sane-backends-%{version}
315
316 # "hp3500" backend
317 # Patch does not match on file unsupported.desc (change should not affect
318 # the backend itself), so we force it in
319 #bzcat %{PATCH20} | patch -p0 -b --suffix .hp3500 -f || :
320
321 # Fix parallel build (Gwenole)
322 #for a in `find . -name Makefile.in -print`; do \
323 # perl -p -i -e 's/^(\s*TARGETS\s+=\s+)(\S+)(\s+)(\$\(\S+_LTOBJS\))/$1$4$3$2/' $a; \
324 #done
325
326 # Patch for the HP ScanJet 44x0C scanners ("hp_rts88xx" backend)
327 #%setup -q -T -D -a 9 -n sane-backends-%{version}%{beta}
328 #cd sane_hp_rts88xx/sane_hp_rts88xx
329 #./patch-sane.sh $RPM_BUILD_DIR/sane-backends-%{version}%{beta}
330 #cd ../..
331 #patch21 -p1 -b .hp_rts88xx-0.18-fix_link
332 #echo 'hp_rts88xx' >> backend/dll.conf.in
333
334 # Primax parallel port scanners
335 %if %{primax_support}
336 %setup -q -T -D -a 3 -n sane-backends-%{version}%{beta}
337 %endif
338
339 # "primascan" backend
340 # (commented out in dll.conf, as it claims to support every USB scanner)
341 %patch29 -p0 -b .primascan
342 cat %{SOURCE11} > backend/primascan.h
343 cat %{SOURCE12} > backend/primascan.c
344 ##perl -p -i -e 's:(BACKENDS=\"):$1primascan :' configure.in
345 # <mrl> avoid autoconf by applying change to configure too.
346 ##perl -p -i -e 's:(BACKENDS=\"):$1primascan :' configure
347 ##perl -p -i -e 's:(DISTFILES\s*=\s*):$1primascan.h primascan.c :' backend/Makefile.in
348 echo '#primascan' >> backend/dll.conf.in
349 autoreconf
350
351 # Scanners in some Brother MF devices
352 #setup -q -T -D -a 10 -n sane-backends-%{version}%{beta}
353
354 # Epson Avasys driver for Epson scanners
355 %if %{epkowa_support}
356 %setup -q -T -D -a 13 -n sane-backends-%{version}%{beta}
357 %endif
358
359 # lib64 fixes (avoid patch)
360 # NOTE: don't regenerate configure script past this line
361 perl -pi -e "s@/lib(\"|\b[^/])@/%_lib\1@g if /LDFLAGS=.*with_ptal/" configure
362
363 # Reduce number of retries done by the "snapscan" backend when accessing
364 # the scanner
365 perl -p -i -e 's:for \(retries = 20; retries; retries--\):for (retries = 5; retries; retries--):' backend/snapscan-scsi.c
366
367 %if %epkowa_support
368 pushd iscan-%{iscanversion}
369 %patch23 -p0 -b .iscan-2.10.0-1_fix_link
370 %patch26 -p0 -b .no_non-free_please
371 %patch27 -p2 -b .linkage_fix
372 popd
373 %endif
374
375 # Remove the backend/dll.conf file generated by the patches, it prevents
376 # the Makefile from generating the real dll.conf file
377 rm -f backend/dll.conf
378
379 %build
380
381 %configure2_5x \
382 --enable-rpath=no \
383 %if !%{gphoto2_support}
384 --without-gphoto2
385 %endif
386
387
388 # Do not use macros here (with percent in the beginning) as parallelized
389 # build does not work
390 %make
391
392 # Primax parallel port scanners
393 %if %{primax_support}
394 chmod a+rx tools/sane-config
395 cd primaxscan*
396 PATH=`pwd`/../tools:${PATH}
397 CFLAGS="${RPM_OPT_FLAGS/-ffast-math/} -fPIC -I`pwd`/../include -L`pwd`/../backend/.libs/"\
398 #CFLAGS="${RPM_OPT_FLAGS/-ffast-math/} -I`pwd`/../include/sane -L`pwd`/../backend/.libs/"\
399 %configure2_5x
400 %make
401 %make primax_scan
402 cd ..
403 %endif
404
405 # Epson Avasys driver for Epson scanners
406 %if %{epkowa_support}
407 chmod a+rx tools/sane-config
408 PATH=`pwd`/tools:${PATH}
409 cd iscan-%{iscanversion}
410 #autoconf
411 sh ./bootstrap
412 export CFLAGS="${RPM_OPT_FLAGS/-ffast-math/} -I`pwd`/../include -L`pwd`/../backend/ -fPIC"
413 export CXXFLAGS="${RPM_OPT_FLAGS/-ffast-math/} -I`pwd`/../include -L`pwd`/../backend/ -fPIC"
414 %configure2_5x --disable-frontend
415 %make
416 cd ..
417 %endif
418
419 %install
420
421 rm -rf %{buildroot}
422 %makeinstall_std
423
424 # Create missing lock dir
425 install -d %{buildroot}/var/lib/lock/sane
426
427 #mv %{buildroot}/%{_sbindir}/saned %{buildroot}/%{_sbindir}/in.saned
428 #install -m 755 tools/sane-find-scanner %{buildroot}/%{_bindir}
429 perl -pi -e "s/installed.*/installed=yes/g" %{buildroot}%{_libdir}/libsane.la
430 /sbin/ldconfig -n %{buildroot}%{_libdir} %{buildroot}%{_libdir}/sane
431
432 # Comment out entry for the "geniusvp2" backend in
433 # /etc/sane.d/dll.conf as it makes SANE hanging on some systems when
434 # the appropriate scanner is not present
435 perl -p -i -e 's/^(\s*geniusvp2)/\#$1/g' %{buildroot}%{_sysconfdir}/sane.d/dll.conf
436
437 # Comment out entry for the "epson" backend in /etc/sane.d/dll.conf as
438 # we have also Epson's "epkowa" backend which supports the same
439 # scanners
440 perl -p -i -e 's/^(\s*epson)/\#$1/g' %{buildroot}%{_sysconfdir}/sane.d/dll.conf
441
442 # Remove "hpoj" line from /etc/sane.d/dll.con
443 perl -p -i -e 's/HP\s+OfficeJet/HPLIP/g' %{buildroot}%{_sysconfdir}/sane.d/dll.conf
444 perl -p -i -e 's/hpoj.sf.net/hplip.sf.net/g' %{buildroot}%{_sysconfdir}/sane.d/dll.conf
445 perl -p -i -e 's/hpoj/hpaio/g' %{buildroot}%{_sysconfdir}/sane.d/dll.conf
446
447 %if %{empty_dll_conf}
448 # The /etc/sane.d/dll.conf contains lines for every backend, so every
449 # backend probes for a scanner when a SANE frontend (e. g. xsane) is
450 # started. With this the user has always to wait around one minute
451 # before he can scan. We simply replace the file by a nearly empty one
452 # and let scannerdrake only insert the needed backends. So the
453 # frontends will start immediately
454 mv %{buildroot}%{_sysconfdir}/sane.d/dll.conf %{buildroot}%{_sysconfdir}/sane.d/dll.conf.orig
455 cat > %{buildroot}%{_sysconfdir}/sane.d/dll.conf <<EOF
456 # enable the next line if you want to allow access through the network:
457 net
458 EOF
459 %endif
460
461 # Remove /usr/lib/libsane.a, it is a broken symlink
462 #rm -f %{buildroot}%{_libdir}/libsane.a
463
464 # Move documentation from /usr/doc to /usr/share/doc
465 install -d %{buildroot}%{_docdir}/sane-backends-%version/
466 install -d %{buildroot}%{_docdir}/sane-backends-doc-%version/
467 pushd %{buildroot}/usr/doc/sane-%{version}
468 #pushd %{buildroot}/usr/doc/sane-1.0.18-cvs
469 mv `find -mindepth 1 -type d` *.html *.ps *.txt %{buildroot}%{_docdir}/sane-backends-doc-%version/
470 mv README README.linux %{buildroot}%{_docdir}/sane-backends-%version/
471 rm -f README.*
472 mv * %{buildroot}%{_docdir}/sane-backends-%version/
473 popd
474
475 # Primax parallel port scanners
476 %if %{primax_support}
477 cd primaxscan*
478 %makeinstall
479 rm -f %{buildroot}%{_libdir}/libsane-primax.a
480 mv %{buildroot}%{_libdir}/libsane-primax* %{buildroot}%{_libdir}/sane/
481 cp primax_scan %{buildroot}%{_bindir}
482 cd ..
483 %endif
484
485 # Epson Avasys driver for Epson scanners
486 %if %{epkowa_support}
487 cd iscan-%{iscanversion}
488 %makeinstall
489 rm -f %{buildroot}%{_libdir}/sane/libsane-epkowa.a
490 rm -f %{buildroot}%{_mandir}/man1/iscan.1*
491 rm -rf %{buildroot}%{_libdir}/iscan
492 cp backend/epkowa.conf %{buildroot}%{_sysconfdir}/sane.d/
493 echo 'epkowa' >> %{buildroot}%{_sysconfdir}/sane.d/dll.conf
494 cd ..
495 %endif
496
497 # Xinetd.d entry
498 mkdir %{buildroot}/etc/xinetd.d
499 cat %{SOURCE5} > %{buildroot}/etc/xinetd.d/saned
500
501 # udev rules for libusb user support
502 mkdir -p %{buildroot}/%{_sysconfdir}/udev/rules.d
503 install -m644 tools/udev/libsane.rules %{buildroot}/%{_sysconfdir}/udev/rules.d/60-libsane.rules
504 # Shorten too long comments
505 perl -p -i -e 's/(\#.{500}).*$/$1 .../' %{buildroot}/%{_sysconfdir}/udev/rules.d/60-libsane.rules
506
507 %find_lang sane-backends
508 %if %epkowa_support
509 %find_lang iscan
510 %endif
511
512 sed -i '/^%dir/d' sane-backends.lang
513 %if %epkowa_support
514 sed -i '/^%dir/d' iscan.lang
515 %endif
516
517 %post -n saned
518 %_post_service saned
519
520 %pre -n saned
521 # Add saned to group cdwriter and ub for scanner access.
522 /usr/sbin/useradd -r -M -s /bin/false -c "system user for saned" saned -G cdwriter,usb || :
523 #%_pre_useradd saned /etc/sane.d /bin/false
524
525 %preun -n saned
526 %_preun_service saned
527
528 %postun -n saned
529 %_postun_userdel saned
530
531 %clean
532 rm -rf %{buildroot}
533
534 %files backends -f sane-backends.lang
535 %defattr(-,root,root,755)
536 %doc %{_docdir}/sane-backends-%version
537 %{_bindir}/sane-find-scanner
538 %{_bindir}/scanimage
539 %{_bindir}/gamma4scanimage
540 %if %{primax_support}
541 %{_bindir}/primax_scan
542 %endif
543 %{_mandir}/man1/*
544 %{_mandir}/man5/*
545 %{_mandir}/man7/*
546 %dir %{_sysconfdir}/sane.d
547 %dir %{_sysconfdir}/sane.d/dll.d
548 #config(noreplace) %{_sysconfdir}/sane.d/*[^saned]
549 %config(noreplace) %{_sysconfdir}/sane.d/*
550 %{_sysconfdir}/udev/rules.d/*-libsane.rules
551 %attr(1777,root,root) %dir /var/lib/lock/sane
552 %if %epkowa_support
553 # iscan files
554 %exclude %_sysconfdir/sane.d/epkowa.conf
555 %exclude %_mandir/man5/sane-epkowa.5*
556 %endif
557
558 %if %epkowa_support
559 %files backends-iscan -f iscan.lang
560 %defattr(-,root,root,755)
561 %_libdir/sane/libsane-epkowa.*
562 %_sysconfdir/sane.d/epkowa.conf
563 %_mandir/man5/sane-epkowa.5*
564 %dir %{_datadir}/iscan
565 %{_datadir}/iscan/*
566 %endif
567
568 %files backends-doc
569 %defattr(-,root,root,755)
570 %doc %{_docdir}/sane-backends-doc-%version
571
572 %files -n %{libname}
573 %defattr(-,root,root,755)
574 %{_libdir}/*.so.*
575 %dir %{_libdir}/sane
576 %{_libdir}/sane/*.so.*
577 %if %epkowa_support
578 %exclude %_libdir/sane/libsane-epkowa.*
579 %endif
580
581 %files -n %{libname_devel}
582 %defattr(-,root,root,755)
583 %{_bindir}/sane-config
584 #%{_libdir}/*.a
585 %{_libdir}/*.la
586 %{_libdir}/*.so
587 #%{_libdir}/sane/*.a
588 %{_libdir}/sane/*.la
589 %{_libdir}/sane/*.so
590 %{_includedir}/sane
591 %if %epkowa_support
592 %exclude %_libdir/sane/libsane-epkowa*
593 %endif
594
595 %files -n saned
596 %defattr(-,root,root,755)
597 %{_sbindir}/*
598 %{_mandir}/man8/saned*
599 #config(noreplace) %{_sysconfdir}/sane.d/saned.conf
600 %attr(644,root,root) %config(noreplace) %{_sysconfdir}/xinetd.d/saned
601
602
603

  ViewVC Help
Powered by ViewVC 1.1.30