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