]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with gnutls # use GNU TLS for SSL/TLS support (instead of OpenSSL) | |
4 | %bcond_without dnssd | |
5 | %bcond_without php # don't build PHP extension/support in web interface | |
6 | %bcond_without perl # don't build Perl extension/support in web interface | |
7 | %bcond_without python # don't build Python support in web interface | |
8 | %bcond_without static_libs # don't build static library | |
9 | # | |
10 | %include /usr/lib/rpm/macros.perl | |
11 | %define pdir CUPS | |
12 | ||
13 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa | |
14 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão | |
15 | Name: cups | |
16 | Version: 1.4.2 | |
17 | Release: 4 | |
18 | Epoch: 1 | |
19 | License: LGPL v2 (libraries), GPL v2 (the rest) + openssl exception | |
20 | Group: Applications/Printing | |
21 | Source0: http://ftp.easysw.com/pub/cups/%{version}/%{name}-%{version}-source.tar.bz2 | |
22 | # Source0-md5: d95e2d588e3d36e563027a963b117b1b | |
23 | Source1: %{name}.init | |
24 | Source2: %{name}.pamd | |
25 | Source3: %{name}.logrotate | |
26 | Source4: %{name}.mailto.conf | |
27 | Source5: %{name}-lpd.inetd | |
28 | Source6: %{name}-modprobe.conf | |
29 | # svn diff http://svn.easysw.com/public/cups/tags/release-1.4.1/ http://svn.easysw.com/public/cups/branches/branch-1.4/ > cups-branch.diff | |
30 | # + drop config-scripts/cups-common.m4 change | |
31 | Patch0: %{name}-config.patch | |
32 | Patch2: %{name}-options.patch | |
33 | Patch3: %{name}-man_pages_linking.patch | |
34 | Patch4: %{name}-nostrip.patch | |
35 | Patch5: %{name}-certs_FHS.patch | |
36 | Patch6: %{name}-direct_usb.patch | |
37 | Patch7: %{name}-no-polluted-krb5config.patch | |
38 | Patch9: %{name}-verbose-compilation.patch | |
39 | Patch10: %{name}-peercred.patch | |
40 | URL: http://www.cups.org/ | |
41 | BuildRequires: acl-devel | |
42 | BuildRequires: autoconf | |
43 | BuildRequires: automake | |
44 | %{?with_dnssd:BuildRequires: avahi-compat-libdns_sd-devel} | |
45 | BuildRequires: dbus-devel | |
46 | BuildRequires: glibc-headers | |
47 | BuildRequires: heimdal-devel | |
48 | %{?with_gnutls:BuildRequires: gnutls-devel} | |
49 | %{?with_java:BuildRequires: jar} | |
50 | %{?with_java:BuildRequires: jdk} | |
51 | %{?with_java:BuildRequires: jpackage-utils} | |
52 | BuildRequires: libjpeg-devel | |
53 | BuildRequires: libpaper-devel | |
54 | BuildRequires: libpng-devel | |
55 | BuildRequires: libstdc++-devel | |
56 | BuildRequires: libtiff-devel | |
57 | BuildRequires: libusb-devel | |
58 | BuildRequires: openldap-devel | |
59 | BuildRequires: openslp-devel | |
60 | %{!?with_gnutls:BuildRequires: openssl-devel} | |
61 | BuildRequires: pam-devel | |
62 | %{?with_php:BuildRequires: php-devel >= 4:5.0.0} | |
63 | BuildRequires: pkgconfig | |
64 | %{?with_java:BuildRequires: rpm-javaprov} | |
65 | BuildRequires: rpm-perlprov | |
66 | BuildRequires: rpmbuild(macros) >= 1.344 | |
67 | Requires(post,preun): /sbin/chkconfig | |
68 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
69 | Requires: openssl-tools | |
70 | Requires: pam >= 0.77.3 | |
71 | Requires: rc-scripts | |
72 | Provides: printingdaemon | |
73 | Obsoletes: printingdaemon | |
74 | Conflicts: ghostscript < 7.05.4 | |
75 | Conflicts: logrotate < 3.7-4 | |
76 | Suggests: cups-filter-pstoraster | |
77 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
78 | ||
79 | %define _ulibdir %{_prefix}/lib | |
80 | ||
81 | %description | |
82 | CUPS provides a portable printing layer for UNIX-based operating | |
83 | systems. It has been developed by Easy Software Products to promote a | |
84 | standard printing solution for all UNIX vendors and users. CUPS | |
85 | provides the System V and Berkeley command-line interfaces. CUPS uses | |
86 | the Internet Printing Protocol ("IPP") as the basis for managing print | |
87 | jobs and queues. The Line Printer Daemon ("LPD") Server Message Block | |
88 | ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are also supported | |
89 | with reduced functionality. CUPS adds network printer browsing and | |
90 | PostScript Printer Description ("PPD") based printing options to | |
91 | support real-world printing under UNIX. | |
92 | ||
93 | %description -l pl.UTF-8 | |
94 | CUPS dostarcza standardowy poziom drukowania dla systemów uniksowych. | |
95 | CUPS używa protokołu IPP - Internet Printint Protocol jako podstawy do | |
96 | zarządzania zadaniami i kolejkami druku. W ograniczonym zakresie | |
97 | obsługiwane są także protokoły LPD (Line Printer Daemon), SMB (Server | |
98 | Message Block) i AppSocket (znany także jako JetDirect). CUPS | |
99 | udostępnia przeglądanie drukarek sieciowych i opcje drukowania oparte | |
100 | na PPD (PostScript Printer Description) do obsługi rzeczywistych | |
101 | drukarek. | |
102 | ||
103 | %description -l pt_BR.UTF-8 | |
104 | O sistema Unix de impressão (CUPS) fornece uma camada de impressão | |
105 | portável para os sistemas operacionais baseados no UNIX®. | |
106 | ||
107 | %package lib | |
108 | Summary: Common Unix Printing System Libraries | |
109 | Summary(pl.UTF-8): Biblioteki dla CUPS | |
110 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - bibliotecas para uso em clientes cups | |
111 | License: LGPL v2 + openssl exception | |
112 | Group: Libraries | |
113 | Provides: %{name}-libs = %{epoch}:%{version}-%{release} | |
114 | Obsoletes: cups-libs | |
115 | Obsoletes: libcups1 | |
116 | ||
117 | %description lib | |
118 | Common Unix Printing System Libraries. | |
119 | ||
120 | %description lib -l pl.UTF-8 | |
121 | Biblioteki dla CUPS. | |
122 | ||
123 | %description lib -l pt_BR.UTF-8 | |
124 | Bibliotecas CUPS requeridas pelos clientes CUPS. | |
125 | ||
126 | %package clients | |
127 | Summary: Common Unix Printing System Clients | |
128 | Summary(pl.UTF-8): Aplikacje klienckie dla CUPS | |
129 | License: GPL v2 + openssl exception | |
130 | Group: Applications/Printing | |
131 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
132 | Provides: printingclient | |
133 | Obsoletes: printingclient | |
134 | ||
135 | %description clients | |
136 | Common Unix Printing System Clients. | |
137 | ||
138 | %description clients -l pl.UTF-8 | |
139 | Aplikacje klienckie dla CUPS. | |
140 | ||
141 | %package image-lib | |
142 | Summary: Common Unix Printing System Libraries - images manipulation | |
143 | Summary(pl.UTF-8): Biblioteki dla CUPS - obsługa formatów graficznych | |
144 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - bibliotecas para uso em clientes cups | |
145 | License: LGPL v2 + openssl exception | |
146 | Group: Libraries | |
147 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} | |
148 | Obsoletes: libcups1 | |
149 | ||
150 | %description image-lib | |
151 | Common Unix Printing System Libraries - images manipalation. | |
152 | ||
153 | %description image-lib -l pl.UTF-8 | |
154 | Biblioteki dla CUPS - obsługa formatów graficznych. | |
155 | ||
156 | %description image-lib -l pt_BR.UTF-8 | |
157 | Bibliotecas CUPS requeridas pelos clientes CUPS. | |
158 | ||
159 | %package devel | |
160 | Summary: Common Unix Printing System development files | |
161 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa - pliki nagłówkowe | |
162 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - ambiente de desenvolvimento | |
163 | License: LGPL v2 + openssl exception | |
164 | Group: Development/Libraries | |
165 | Requires: %{name}-image-lib = %{epoch}:%{version}-%{release} | |
166 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} | |
167 | # for libcups | |
168 | %{?with_gnutls:Requires: gnutls-devel} | |
169 | Requires: heimdal-devel | |
170 | %{!?with_gnutls:Requires: openssl-devel} | |
171 | Requires: zlib-devel | |
172 | # for libcupsimage | |
173 | Requires: libjpeg-devel | |
174 | Requires: libpng-devel | |
175 | Requires: libtiff-devel | |
176 | Obsoletes: libcups1-devel | |
177 | ||
178 | %description devel | |
179 | Common Unix Printing System development files. | |
180 | ||
181 | %description devel -l pl.UTF-8 | |
182 | Ogólny system druku dla Uniksa - pliki nagłówkowe. | |
183 | ||
184 | %description devel -l pt_BR.UTF-8 | |
185 | Este pacote é um adicional que contem um ambiente de desenvolvimento | |
186 | para a criação de suporte a novas impressoras e novos serviços ao | |
187 | CUPS. | |
188 | ||
189 | %package static | |
190 | Summary: Common Unix Printing System static libraries | |
191 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa - biblioteki statyczne | |
192 | Summary(pt_BR.UTF-8): Common Unix Printing System - bibliotecas estáticas | |
193 | License: LGPL v2 + openssl exception | |
194 | Group: Development/Libraries | |
195 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
196 | ||
197 | %description static | |
198 | Common Unix Printing System static libraries. | |
199 | ||
200 | %description static -l pl.UTF-8 | |
201 | Ogólny system druku dla Uniksa - biblioteki statyczne. | |
202 | ||
203 | %description static -l pt_BR.UTF-8 | |
204 | Bibliotecas estáticas para desenvolvimento de programas que usam as | |
205 | bibliotecas do CUPS. | |
206 | ||
207 | %package -n perl-cups | |
208 | Summary: Perl module for CUPS | |
209 | Summary(pl.UTF-8): Moduł Perla CUPS | |
210 | License: GPL v2 + openssl exception | |
211 | Group: Development/Languages/Perl | |
212 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} | |
213 | ||
214 | %description -n perl-cups | |
215 | Perl module for Common Unix Printing System. | |
216 | ||
217 | %description -n perl-cups -l pl.UTF-8 | |
218 | Moduł Perla do ogólnego systemu druku dla Uniksa. | |
219 | ||
220 | %package -n php-cups | |
221 | Summary: PHP module for CUPS | |
222 | Summary(pl.UTF-8): Moduł PHP CUPS | |
223 | License: GPL v2 + openssl exception | |
224 | Group: Development/Languages/PHP | |
225 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} | |
226 | %{?requires_php_extension} | |
227 | Requires: /etc/php/conf.d | |
228 | Requires: php-common >= 4:5.0.0 | |
229 | ||
230 | %description -n php-cups | |
231 | PHP module for Common Unix Printing System. | |
232 | ||
233 | %description -n php-cups -l pl.UTF-8 | |
234 | Moduł PHP do ogólnego systemu druku dla Uniksa. | |
235 | ||
236 | %package -n java-cups | |
237 | Summary: CUPS java classes | |
238 | Summary(pl.UTF-8): Klasy javy CUPS | |
239 | License: GPL v2 + openssl exception | |
240 | Group: Libraries/Java | |
241 | Requires: jpackage-utils | |
242 | ||
243 | %description -n java-cups | |
244 | Common Unix Printing System Java classes. | |
245 | ||
246 | %description -n java-cups -l pl.UTF-8 | |
247 | Klasy javy do ogólnego systemu druku dla Uniksa. | |
248 | ||
249 | %package -n java-cups-javadoc | |
250 | Summary: Online manual for %{name} | |
251 | Summary(pl.UTF-8): Dokumentacja online do %{name} | |
252 | License: GPL v2 + openssl exception | |
253 | Group: Documentation | |
254 | Requires: jpackage-utils | |
255 | ||
256 | %description -n java-cups-javadoc | |
257 | Documentation for %{name}. | |
258 | ||
259 | %description -n java-cups-javadoc -l pl.UTF-8 | |
260 | Dokumentacja do %{name}. | |
261 | ||
262 | %description -n java-cups-javadoc -l fr.UTF-8 | |
263 | Javadoc pour %{name}. | |
264 | ||
265 | %package backend-usb | |
266 | Summary: USB backend for CUPS | |
267 | Summary(pl.UTF-8): Backend USB dla CUPS-a | |
268 | License: GPL v2 + openssl exception | |
269 | Group: Applications/Printing | |
270 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
271 | ||
272 | %description backend-usb | |
273 | This package allow CUPS printing on USB printers. | |
274 | ||
275 | %description backend-usb -l pl.UTF-8 | |
276 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach USB. | |
277 | ||
278 | %package backend-serial | |
279 | Summary: Serial port backend for CUPS | |
280 | Summary(pl.UTF-8): Backend obsługujący porty szeregowe dla CUPS-a | |
281 | License: GPL v2 + openssl exception | |
282 | Group: Applications/Printing | |
283 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
284 | ||
285 | %description backend-serial | |
286 | This package allow CUPS printing on printers connected by serial | |
287 | ports. | |
288 | ||
289 | %description backend-serial -l pl.UTF-8 | |
290 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach | |
291 | podłączonych do portów szeregowych. | |
292 | ||
293 | %package backend-parallel | |
294 | Summary: Parallel port backend for CUPS | |
295 | Summary(pl.UTF-8): Backend obsługujący porty równoległe dla CUPS-a | |
296 | License: GPL v2 + openssl exception | |
297 | Group: Applications/Printing | |
298 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
299 | ||
300 | %description backend-parallel | |
301 | This package allow CUPS printing on printers connected by parallel | |
302 | ports. | |
303 | ||
304 | %description backend-parallel -l pl.UTF-8 | |
305 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach | |
306 | podłączonych do portów równoległych. | |
307 | ||
308 | %package lpd | |
309 | Summary: LPD compatibility support for CUPS print server | |
310 | Summary(pl.UTF-8): Wsparcie dla LPD w serwerze wydruków CUPS | |
311 | License: GPL v2 + openssl exception | |
312 | Group: Applications/Printing | |
313 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
314 | Requires: rc-inetd | |
315 | ||
316 | %description lpd | |
317 | LPD compatibility support for CUPS print server. | |
318 | ||
319 | %description lpd -l pl.UTF-8 | |
320 | Wsparcie dla LPD w serwerze wydruków CUPS. | |
321 | ||
322 | %prep | |
323 | %setup -q | |
324 | %patch0 -p1 | |
325 | %patch2 -p1 | |
326 | %patch3 -p1 | |
327 | %patch4 -p1 | |
328 | %patch5 -p1 | |
329 | %patch6 -p1 | |
330 | %patch7 -p1 | |
331 | %patch9 -p1 | |
332 | %patch10 -p1 | |
333 | ||
334 | %build | |
335 | %{__aclocal} -I config-scripts | |
336 | %{__autoconf} | |
337 | %configure \ | |
338 | --libdir=%{_ulibdir} \ | |
339 | --disable-cdsassl \ | |
340 | --enable-libpaper \ | |
341 | --enable-libusb \ | |
342 | --enable-acl \ | |
343 | --enable-dbus \ | |
344 | --enable-image \ | |
345 | --enable-bannertops \ | |
346 | --enable-texttops \ | |
347 | --enable-shared \ | |
348 | --enable-ssl \ | |
349 | %{?debug:--enable-debug} \ | |
350 | --%{!?with_dnssd:dis}%{?with_dnssd:en}able-dnssd \ | |
351 | --%{!?with_gnutls:dis}%{?with_gnutls:en}able-gnutls \ | |
352 | --%{?with_gnutls:dis}%{!?with_gnutls:en}able-openssl \ | |
353 | %{?with_static_libs:--enable-static} \ | |
354 | --with-cups-user=lp \ | |
355 | --with-cups-group=lp \ | |
356 | --with-system-groups=sys \ | |
357 | --with-printcap=/etc/printcap \ | |
358 | --with-dbusdir=/etc/dbus-1 \ | |
359 | --with-docdir=%{_ulibdir}/%{name}/cgi-bin \ | |
360 | --with-config-file-perm=0640 \ | |
361 | --with-log-file-perm=0640 \ | |
362 | --with-optim=-Wno-format-y2k \ | |
363 | %{?with_dnssd:--with-dnssd-libs=x} \ | |
364 | %{?with_dnssd:--with-dnssd-includes=x} \ | |
365 | --with-java=%{_bindir}/java \ | |
366 | %{?with_perl:--with-perl=%{_bindir}/perl} \ | |
367 | %{?with_php:--with-php=%{_bindir}/php} \ | |
368 | %{?with_python:--with-python=%{_bindir}/python} | |
369 | ||
370 | %{__make} | |
371 | ||
372 | %{__perl} -pi -e 's#-I\.\.\/\.\.#-I../.. -I../../cups#g' scripting/php/Makefile | |
373 | %{?with_php:%{__make} -C scripting/php PHPCONFIG=%{_bindir}/php-config} | |
374 | ||
375 | %if %{with perl} | |
376 | cd scripting/perl | |
377 | %{__perl} -pi -e 's@-lcups@-L../../cups $1@' Makefile.PL | |
378 | %{__perl} Makefile.PL \ | |
379 | INSTALLDIRS=vendor \ | |
380 | OPTIMIZE="%{rpmcflags} -I../.." | |
381 | # avoid rpaths generated by MakeMaker | |
382 | %{__perl} -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' Makefile | |
383 | ||
384 | %{__make} | |
385 | cd ../.. | |
386 | %endif | |
387 | ||
388 | %install | |
389 | rm -rf $RPM_BUILD_ROOT | |
390 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,logrotate.d,modprobe.d,security,sysconfig/rc-inetd} \ | |
391 | $RPM_BUILD_ROOT/var/run/cups \ | |
392 | $RPM_BUILD_ROOT/var/log/{,archive/}cups | |
393 | ||
394 | %{__make} install \ | |
395 | BUILDROOT=$RPM_BUILD_ROOT \ | |
396 | CUPS_USER=$(id -u) \ | |
397 | CUPS_GROUP=$(id -g) | |
398 | ||
399 | if [ "%{_lib}" != "lib" ] ; then | |
400 | install -d $RPM_BUILD_ROOT%{_libdir} | |
401 | mv $RPM_BUILD_ROOT%{_ulibdir}/*.so* $RPM_BUILD_ROOT%{_libdir} | |
402 | %if %{with static_libs} | |
403 | mv $RPM_BUILD_ROOT%{_ulibdir}/*.a $RPM_BUILD_ROOT%{_libdir} | |
404 | %endif | |
405 | fi | |
406 | ||
407 | %if %{with php} | |
408 | %{__make} -C scripting/php install \ | |
409 | PHPDIR=$RPM_BUILD_ROOT%{php_extensiondir} | |
410 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d | |
411 | cat > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/phpcups.ini << 'EOF' | |
412 | ; Enable phpcups extension module | |
413 | extension=phpcups.so | |
414 | EOF | |
415 | %endif | |
416 | ||
417 | %if %{with perl} | |
418 | %{__make} -C scripting/perl install \ | |
419 | DESTDIR=$RPM_BUILD_ROOT | |
420 | %endif | |
421 | ||
422 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
423 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/%{name} | |
424 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
425 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/cups/mailto.conf | |
426 | sed -e 's|__ULIBDIR__|%{_ulibdir}|g' %{SOURCE5} > $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/cups-lpd | |
427 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/modprobe.d/cups.conf | |
428 | ||
429 | touch $RPM_BUILD_ROOT/var/log/cups/{access_log,error_log,page_log} | |
430 | touch $RPM_BUILD_ROOT/etc/security/blacklist.cups | |
431 | touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{classes,printers,client}.conf | |
432 | ||
433 | # windows drivers can be put there. | |
434 | install -d $RPM_BUILD_ROOT%{_datadir}/cups/drivers | |
435 | ||
436 | # dirs for gimp-print-cups-4.2.7-1 | |
437 | install -d $RPM_BUILD_ROOT%{_datadir}/cups/model/{C,da,en_GB,fr,nb,pl,sv} | |
438 | ||
439 | touch $RPM_BUILD_ROOT/var/cache/cups/help.index | |
440 | touch $RPM_BUILD_ROOT/var/cache/cups/{job,remote}.cache | |
441 | touch $RPM_BUILD_ROOT/var/cache/cups/ppds.dat | |
442 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/cups/ssl | |
443 | ||
444 | # links to enable/disable (compatibility!) | |
445 | ln -s accept $RPM_BUILD_ROOT%{_sbindir}/enable | |
446 | ln -s accept $RPM_BUILD_ROOT%{_sbindir}/disable | |
447 | ||
448 | # fix/update locale names | |
449 | install -d $RPM_BUILD_ROOT%{_datadir}/locale/{nb,zh_CN} | |
450 | mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{no/cups_no.po,nb/cups_nb.po} | |
451 | mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{zh/cups_zh.po,zh_CN/cups_zh_CN.po} | |
452 | ||
453 | # check-files cleanup | |
454 | rm -rf $RPM_BUILD_ROOT%{_mandir}/{,es/,fr/}cat? | |
455 | rm -rf $RPM_BUILD_ROOT/''etc/{init.d,rc?.d}/* | |
456 | rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cupsd.conf.default | |
457 | ||
458 | %clean | |
459 | rm -rf $RPM_BUILD_ROOT | |
460 | ||
461 | %post | |
462 | /sbin/chkconfig --add cups | |
463 | %service cups restart "cups daemon" | |
464 | /sbin/rmmod usblp > /dev/null 2>&1 || : | |
465 | ||
466 | %preun | |
467 | if [ "$1" = "0" ]; then | |
468 | %service cups stop | |
469 | /sbin/chkconfig --del cups | |
470 | fi | |
471 | ||
472 | %post lib -p /sbin/ldconfig | |
473 | %postun lib -p /sbin/ldconfig | |
474 | %post image-lib -p /sbin/ldconfig | |
475 | %postun image-lib -p /sbin/ldconfig | |
476 | ||
477 | %post -n php-cups | |
478 | %php_webserver_restart | |
479 | ||
480 | %postun -n php-cups | |
481 | if [ "$1" = 0 ]; then | |
482 | %php_webserver_restart | |
483 | fi | |
484 | ||
485 | %post lpd | |
486 | %service -q rc-inetd reload | |
487 | ||
488 | %postun lpd | |
489 | if [ "$1" = 0 ]; then | |
490 | %service -q rc-inetd reload | |
491 | fi | |
492 | ||
493 | %files | |
494 | %defattr(644,root,root,755) | |
495 | %doc *.txt | |
496 | %attr(640,root,root) %config %verify(not md5 mtime size) /etc/pam.d/* | |
497 | %attr(754,root,root) /etc/rc.d/init.d/cups | |
498 | /etc/dbus-1/system.d/cups.conf | |
499 | /etc/modprobe.d/cups.conf | |
500 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/classes.conf | |
501 | %attr(640,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/cupsd.conf | |
502 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/printers.conf | |
503 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mailto.conf | |
504 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/snmp.conf | |
505 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.cups | |
506 | %dir %attr(700,root,lp) %{_sysconfdir}/%{name}/ssl | |
507 | %dir %{_sysconfdir}/%{name}/interfaces | |
508 | %dir %attr(755,root,lp) %{_sysconfdir}/%{name}/ppd | |
509 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} | |
510 | %attr(4755,lp,root) %{_bindir}/lppasswd | |
511 | %attr(755,root,root) %{_bindir}/cupstestppd | |
512 | %attr(755,root,root) %{_bindir}/cupstestdsc | |
513 | %attr(755,root,root) %{_bindir}/ppd* | |
514 | %attr(755,root,root) %{_sbindir}/cupsctl | |
515 | %attr(755,root,root) %{_sbindir}/cupsd | |
516 | %attr(755,root,root) %{_sbindir}/cupsfilter | |
517 | ||
518 | %dir %{_ulibdir}/cups | |
519 | %dir %{_ulibdir}/cups/* | |
520 | %{_ulibdir}/cups/cgi-bin/help | |
521 | %{_ulibdir}/cups/cgi-bin/images | |
522 | %attr(755,root,root) %{_ulibdir}/cups/cgi-bin/*.cgi | |
523 | %{_ulibdir}/cups/cgi-bin/*.css | |
524 | %{_ulibdir}/cups/cgi-bin/*.html | |
525 | %{_ulibdir}/cups/cgi-bin/*.txt | |
526 | %lang(de) %{_ulibdir}/cups/cgi-bin/de | |
527 | %lang(es) %{_ulibdir}/cups/cgi-bin/es | |
528 | %lang(eu) %{_ulibdir}/cups/cgi-bin/eu | |
529 | %lang(ja) %{_ulibdir}/cups/cgi-bin/ja | |
530 | %lang(pl) %{_ulibdir}/cups/cgi-bin/pl | |
531 | %lang(ru) %{_ulibdir}/cups/cgi-bin/ru | |
532 | ||
533 | %exclude %{_ulibdir}/cups/backend/usb | |
534 | %exclude %{_ulibdir}/cups/backend/serial | |
535 | %exclude %{_ulibdir}/cups/backend/parallel | |
536 | %attr(755,root,root) %{_ulibdir}/cups/backend/* | |
537 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-deviced | |
538 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-driverd | |
539 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-polld | |
540 | %attr(755,root,root) %{_ulibdir}/cups/filter/* | |
541 | %attr(755,root,root) %{_ulibdir}/cups/monitor/* | |
542 | %attr(755,root,root) %{_ulibdir}/cups/notifier/* | |
543 | ||
544 | %{_datadir}/cups/banners | |
545 | %{_datadir}/cups/charsets | |
546 | %{_datadir}/cups/data | |
547 | %{_datadir}/cups/drivers | |
548 | %{_datadir}/cups/drv | |
549 | %{_datadir}/cups/examples | |
550 | %{_datadir}/cups/fonts | |
551 | %{_datadir}/cups/mime | |
552 | %dir %{_datadir}/cups/model | |
553 | # dirs for gimp-print-cups-4.2.7-1 | |
554 | %dir %{_datadir}/cups/model/C | |
555 | %lang(da) %dir %{_datadir}/cups/model/da | |
556 | %lang(en_GB) %dir %{_datadir}/cups/model/en_GB | |
557 | %lang(fr) %dir %{_datadir}/cups/model/fr | |
558 | %lang(nb) %dir %{_datadir}/cups/model/nb | |
559 | %lang(pl) %dir %{_datadir}/cups/model/pl | |
560 | %lang(sv) %dir %{_datadir}/cups/model/sv | |
561 | ||
562 | %{_datadir}/cups/ppdc | |
563 | ||
564 | %dir %{_datadir}/cups/templates | |
565 | %{_datadir}/cups/templates/*.tmpl | |
566 | %lang(de) %{_datadir}/cups/templates/de | |
567 | %lang(es) %{_datadir}/cups/templates/es | |
568 | %lang(eu) %{_datadir}/cups/templates/eu | |
569 | %lang(ja) %{_datadir}/cups/templates/ja | |
570 | %lang(pl) %{_datadir}/cups/templates/pl | |
571 | %lang(ru) %{_datadir}/cups/templates/ru | |
572 | %{_mandir}/man1/cupstestppd.1* | |
573 | %{_mandir}/man1/cupstestdsc.1* | |
574 | %{_mandir}/man1/lppasswd.1* | |
575 | %{_mandir}/man1/ppd*.1* | |
576 | %{_mandir}/man7/backend.7* | |
577 | %{_mandir}/man7/drv.7* | |
578 | %{_mandir}/man7/filter.7* | |
579 | %{_mandir}/man7/notifier.7* | |
580 | %{_mandir}/man5/* | |
581 | %{_mandir}/man8/accept.8* | |
582 | %{_mandir}/man8/cups-deviced.8* | |
583 | %{_mandir}/man8/cups-driverd.8* | |
584 | %{_mandir}/man8/cups-polld.8* | |
585 | %{_mandir}/man8/cupsaddsmb.8* | |
586 | %{_mandir}/man8/cupsctl.8* | |
587 | %{_mandir}/man8/cupsd.8* | |
588 | %{_mandir}/man8/cupsenable.8* | |
589 | %{_mandir}/man8/cupsfilter.8* | |
590 | %{_mandir}/man8/lp* | |
591 | ||
592 | %dir %attr(775,root,lp) /var/cache/cups | |
593 | %dir %attr(755,root,lp) /var/lib/cups | |
594 | %dir %attr(511,lp,sys) /var/lib/cups/certs | |
595 | %dir %attr(755,root,lp) /var/run/cups | |
596 | %dir %attr(710,root,lp) /var/spool/cups | |
597 | %dir %attr(1770,root,lp) /var/spool/cups/tmp | |
598 | %attr(600,lp,lp) %ghost /var/cache/cups/help.index | |
599 | %attr(640,root,lp) %ghost /var/cache/cups/job.cache | |
600 | %attr(600,lp,lp) %ghost /var/cache/cups/ppds.dat | |
601 | %attr(640,root,lp) %ghost /var/cache/cups/remote.cache | |
602 | %attr(750,root,logs) %dir /var/log/archive/cups | |
603 | %attr(750,root,logs) %dir /var/log/cups | |
604 | %attr(640,root,logs) %ghost /var/log/cups/access_log | |
605 | %attr(640,root,logs) %ghost /var/log/cups/error_log | |
606 | %attr(640,root,logs) %ghost /var/log/cups/page_log | |
607 | ||
608 | %files lib | |
609 | %defattr(644,root,root,755) | |
610 | %dir %attr(755,root,lp) %{_sysconfdir}/%{name} | |
611 | %attr(755,root,root) %{_libdir}/libcups.so.* | |
612 | %attr(755,root,root) %{_libdir}/libcupscgi.so.* | |
613 | %attr(755,root,root) %{_libdir}/libcupsdriver.so.* | |
614 | %attr(755,root,root) %{_libdir}/libcupsmime.so.* | |
615 | %attr(755,root,root) %{_libdir}/libcupsppdc.so.* | |
616 | %dir %{_datadir}/cups | |
617 | %{_datadir}/cups/charmaps | |
618 | %lang(da) %{_datadir}/locale/da/cups_da.po | |
619 | %lang(de) %{_datadir}/locale/de/cups_de.po | |
620 | %lang(es) %{_datadir}/locale/es/cups_es.po | |
621 | %lang(eu) %{_datadir}/locale/eu/cups_eu.po | |
622 | %lang(fi) %{_datadir}/locale/fi/cups_fi.po | |
623 | %lang(fr) %{_datadir}/locale/fr/cups_fr.po | |
624 | %lang(it) %{_datadir}/locale/it/cups_it.po | |
625 | %lang(ko) %{_datadir}/locale/ko/cups_ko.po | |
626 | %lang(ja) %{_datadir}/locale/ja/cups_ja.po | |
627 | %lang(nl) %{_datadir}/locale/nl/cups_nl.po | |
628 | %lang(nb) %{_datadir}/locale/nb/cups_nb.po | |
629 | %lang(pl) %{_datadir}/locale/pl/cups_pl.po | |
630 | %lang(pt) %{_datadir}/locale/pt/cups_pt.po | |
631 | %lang(pt_BR) %{_datadir}/locale/pt_BR/cups_pt_BR.po | |
632 | %lang(ru) %{_datadir}/locale/ru/cups_ru.po | |
633 | %lang(sv) %{_datadir}/locale/sv/cups_sv.po | |
634 | %lang(zh_CN) %{_datadir}/locale/zh_CN/cups_zh_CN.po | |
635 | %lang(zh_TW) %{_datadir}/locale/zh_TW/cups_zh_TW.po | |
636 | ||
637 | %files clients | |
638 | %defattr(644,root,root,755) | |
639 | %attr(644,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/client.conf | |
640 | %attr(755,root,root) %{_bindir}/cancel | |
641 | %attr(755,root,root) %{_bindir}/lp | |
642 | %attr(755,root,root) %{_bindir}/lpoptions | |
643 | %attr(755,root,root) %{_bindir}/lpq | |
644 | %attr(755,root,root) %{_bindir}/lpr | |
645 | %attr(755,root,root) %{_bindir}/lprm | |
646 | %attr(755,root,root) %{_bindir}/lpstat | |
647 | %attr(755,root,root) %{_sbindir}/accept | |
648 | %attr(755,root,root) %{_sbindir}/cupsaccept | |
649 | %attr(755,root,root) %{_sbindir}/cupsaddsmb | |
650 | %attr(755,root,root) %{_sbindir}/cupsenable | |
651 | %attr(755,root,root) %{_sbindir}/cupsdisable | |
652 | %attr(755,root,root) %{_sbindir}/cupsreject | |
653 | %attr(755,root,root) %{_sbindir}/disable | |
654 | %attr(755,root,root) %{_sbindir}/enable | |
655 | %attr(755,root,root) %{_sbindir}/lpadmin | |
656 | %attr(755,root,root) %{_sbindir}/lpc | |
657 | %attr(755,root,root) %{_sbindir}/lpinfo | |
658 | %attr(755,root,root) %{_sbindir}/lpmove | |
659 | %attr(755,root,root) %{_sbindir}/reject | |
660 | %{_desktopdir}/cups.desktop | |
661 | %{_iconsdir}/hicolor/*/apps/cups.png | |
662 | %{_mandir}/man1/cancel.1* | |
663 | %{_mandir}/man1/lp.1* | |
664 | %{_mandir}/man1/lpoptions.1* | |
665 | %{_mandir}/man1/lpq.1* | |
666 | %{_mandir}/man1/lpr.1* | |
667 | %{_mandir}/man1/lprm.1* | |
668 | %{_mandir}/man1/lpstat.1* | |
669 | %{_mandir}/man8/cupsaccept.8* | |
670 | %{_mandir}/man8/cupsdisable.8* | |
671 | %{_mandir}/man8/cupsreject.8* | |
672 | %{_mandir}/man8/reject.8* | |
673 | ||
674 | %files image-lib | |
675 | %defattr(644,root,root,755) | |
676 | %attr(755,root,root) %{_libdir}/libcupsimage.so.* | |
677 | ||
678 | %files devel | |
679 | %defattr(644,root,root,755) | |
680 | %attr(755,root,root) %{_bindir}/cups-config | |
681 | %attr(755,root,root) %{_libdir}/libcups.so | |
682 | %attr(755,root,root) %{_libdir}/libcupscgi.so | |
683 | %attr(755,root,root) %{_libdir}/libcupsdriver.so | |
684 | %attr(755,root,root) %{_libdir}/libcupsimage.so | |
685 | %attr(755,root,root) %{_libdir}/libcupsmime.so | |
686 | %attr(755,root,root) %{_libdir}/libcupsppdc.so | |
687 | %{_includedir}/cups | |
688 | %{_mandir}/man1/cups-config.1* | |
689 | ||
690 | %if %{with static_libs} | |
691 | %files static | |
692 | %defattr(644,root,root,755) | |
693 | %{_libdir}/libcups.a | |
694 | %{_libdir}/libcupscgi.a | |
695 | %{_libdir}/libcupsdriver.a | |
696 | %{_libdir}/libcupsimage.a | |
697 | %{_libdir}/libcupsmime.a | |
698 | %{_libdir}/libcupsppdc.a | |
699 | %endif | |
700 | ||
701 | %if %{with perl} | |
702 | %files -n perl-cups | |
703 | %defattr(644,root,root,755) | |
704 | %{perl_vendorarch}/CUPS.pm | |
705 | %dir %{perl_vendorarch}/auto/CUPS | |
706 | %{perl_vendorarch}/auto/CUPS/CUPS.bs | |
707 | %{perl_vendorarch}/auto/CUPS/autosplit.ix | |
708 | %attr(755,root,root) %{perl_vendorarch}/auto/CUPS/CUPS.so | |
709 | %{_mandir}/man3/CUPS.3pm* | |
710 | %endif | |
711 | ||
712 | %if %{with php} | |
713 | %files -n php-cups | |
714 | %defattr(644,root,root,755) | |
715 | %doc scripting/php/README | |
716 | %attr(755,root,root) %{php_extensiondir}/phpcups.so | |
717 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/phpcups.ini | |
718 | %endif | |
719 | ||
720 | %files backend-usb | |
721 | %defattr(644,root,root,755) | |
722 | %attr(755,root,root) %{_ulibdir}/cups/backend/usb | |
723 | ||
724 | %files backend-serial | |
725 | %defattr(644,root,root,755) | |
726 | %attr(755,root,root) %{_ulibdir}/cups/backend/serial | |
727 | ||
728 | %files backend-parallel | |
729 | %defattr(644,root,root,755) | |
730 | %attr(755,root,root) %{_ulibdir}/cups/backend/parallel | |
731 | ||
732 | %files lpd | |
733 | %defattr(644,root,root,755) | |
734 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/* | |
735 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-lpd | |
736 | %{_mandir}/man8/cups-lpd.8* |