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