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