]> git.pld-linux.org Git - packages/cups.git/blob - cups.spec
- fix client-error-forbidden unless /jobs section exists in cupsd.conf; no option...
[packages/cups.git] / cups.spec
1 #
2 # Conditional build:
3 %bcond_without  php     # don't build PHP extension
4 %bcond_without  perl    # don't build Perl extension
5 #
6 # TODO:
7 # - register php module
8 # - build/install java ext ?
9 # - perl BRs
10 %include        /usr/lib/rpm/macros.perl
11 Summary:        Common Unix Printing System
12 Summary(pl):    Popularny system druku dla Uniksa
13 Summary(pt_BR): Sistema Unix de Impressão
14 Name:           cups
15 Version:        1.1.23
16 Release:        5
17 Epoch:          1
18 License:        GPL/LGPL
19 Group:          Applications/Printing
20 Source0:        http://ftp.easysw.com/pub/cups/%{version}/%{name}-%{version}-source.tar.bz2
21 # Source0-md5:  4ce09b1dce09b6b9398af0daae9adf63
22 #Source0:       http://ftp.easysw.com/pub/cups/test/%{name}-%{version}%{_suf}-source.tar.bz2
23 Source1:        %{name}.init
24 Source2:        %{name}.pamd
25 Source3:        %{name}.logrotate
26 Patch0:         %{name}-config.patch
27 Patch1:         %{name}-lp-lpr.patch
28 Patch2:         %{name}-options.patch
29 Patch3:         %{name}-ENCRYPTIONtxt.patch
30 Patch4:         %{name}-man_pages_linking.patch
31 Patch5:         %{name}-nolibs.patch
32 Patch6:         %{name}-nostrip.patch
33 Patch7:         %{name}-rpath.patch
34 Patch8:         %{name}-gcc34.patch
35 Patch9:         %{name}-tmpdir.patch
36 Patch10:        %{name}-gcc4.patch
37 Patch11:        %{name}-CAN-2005-2097.patch
38 Patch12:        %{name}-anonymous_jobs.patch
39 URL:            http://www.cups.org/
40 BuildRequires:  autoconf
41 BuildRequires:  automake
42 BuildRequires:  libjpeg-devel
43 BuildRequires:  libpng-devel
44 BuildRequires:  libstdc++-devel
45 BuildRequires:  libtiff-devel
46 BuildRequires:  openslp-devel
47 BuildRequires:  openssl-devel >= 0.9.7d
48 BuildRequires:  pam-devel
49 %{?with_php:BuildRequires:      php-devel}
50 BuildRequires:  pkgconfig
51 BuildRequires:  rpm-perlprov
52 PreReq:         %{name}-libs = %{epoch}:%{version}-%{release}
53 Requires(post,preun):   /sbin/chkconfig
54 Requires:       pam >= 0.77.3
55 Conflicts:      ghostscript < 7.05.4
56 Obsoletes:      LPRng
57 Obsoletes:      lpr
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %define         _ulibdir        %{_prefix}/lib
61
62 %description
63 CUPS provides a portable printing layer for UNIX-based operating
64 systems. It has been developed by Easy Software Products to promote a
65 standard printing solution for all UNIX vendors and users. CUPS
66 provides the System V and Berkeley command-line interfaces. CUPS uses
67 the Internet Printing Protocol ("IPP") as the basis for managing print
68 jobs and queues. The Line Printer Daemon ("LPD") Server Message Block
69 ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are also supported
70 with reduced functionality. CUPS adds network printer browsing and
71 PostScript Printer Description ("PPD") based printing options to
72 support real-world printing under UNIX.
73
74 %description -l pl
75 CUPS dostarcza standardowy poziom drukowania dla systemów uniksowych.
76 CUPS u¿ywa protoko³u IPP - Internet Printint Protocol jako podstawy do
77 zarz±dzania zadaniami i kolejkami druku.
78
79 %description -l pt_BR
80 O sistema Unix de impressão (CUPS) fornece uma camada de impressão
81 portável para os sistemas operacionais baseados no UNIX®.
82
83 %package lib
84 Summary:        Common Unix Printing System Libraries
85 Summary(pl):    Biblioteki dla CUPS
86 Summary(pt_BR): Sistema Unix de Impressão - bibliotecas para uso em clientes cups
87 Group:          Libraries
88 Provides:       %{name}-libs = %{epoch}:%{version}-%{release}
89 Obsoletes:      %{name}-libs
90 Obsoletes:      libcups1
91
92 %description lib
93 Common Unix Printing System Libraries.
94
95 %description lib -l pl
96 Biblioteki dla CUPS.
97
98 %description lib -l pt_BR
99 Bibliotecas CUPS requeridas pelos clientes CUPS.
100
101 %package clients
102 Summary:        Common Unix Printing System Clients
103 Summary(pl):    Aplikacje klienckie dla CUPS
104 Group:          Applications/Printing
105 Provides:       %{name}-clients = %{epoch}:%{version}-%{release}
106 Conflicts:      LPRng
107
108 %description clients
109 Common Unix Printing System Clients.
110
111 %description clients -l pl
112 Aplikacje klienckie dla CUPS.
113
114 %package image-lib
115 Summary:        Common Unix Printing System Libraries - images manipulation
116 Summary(pl):    Biblioteki dla CUPS - obs³uga formatów graficznych
117 Summary(pt_BR): Sistema Unix de Impressão - bibliotecas para uso em clientes cups
118 Group:          Libraries
119 Requires:       %{name}-lib = %{epoch}:%{version}-%{release}
120 Obsoletes:      libcups1
121
122 %description image-lib
123 Common Unix Printing System Libraries - images manupalation.
124
125 %description image-lib -l pl
126 Biblioteki dla CUPS - obs³uga formatów graficznych.
127
128 %description image-lib -l pt_BR
129 Bibliotecas CUPS requeridas pelos clientes CUPS.
130
131 %package devel
132 Summary:        Common Unix Printing System development files
133 Summary(pl):    Popularny System Druku dla Uniksa, pliki nag³ówkowe
134 Summary(pt_BR): Sistema Unix de Impressão - ambiente de desenvolvimento
135 Group:          Development/Libraries
136 Requires:       %{name}-image-lib = %{epoch}:%{version}-%{release}
137 Requires:       %{name}-lib = %{epoch}:%{version}-%{release}
138 Obsoletes:      libcups1-devel
139
140 %description devel
141 Common Unix Printing System development files.
142
143 %description devel -l pl
144 Popularny System Druku dla Uniksa, pliki nag³ówkowe.
145
146 %description devel -l pt_BR
147 Este pacote é um adicional que contem um ambiente de desenvolvimento
148 para a criação de suporte a novas impressoras e novos serviços ao
149 CUPS.
150
151 %package static
152 Summary:        Common Unix Printing System static libraries
153 Summary(pl):    Popularny System Druku dla Uniksa, biblioteki statyczne
154 Summary(pt_BR): Common Unix Printing System - bibliotecas estáticas
155 Group:          Development/Libraries
156 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
157
158 %description static
159 Common Unix Printing System static libraries.
160
161 %description static -l pl
162 Popularny System Druku dla Uniksa, biblioteki statyczne.
163
164 %description static -l pt_BR
165 Bibliotecas estáticas para desenvolvimento de programas que usam as
166 bibliotecas do CUPS.
167
168 %package -n perl-cups
169 Summary:        Perl module for CUPS
170 Summary(pl):    Modu³ Perla CUPS
171 Group:          Development/Languages/Perl
172 Requires:       %{name}-lib = %{epoch}:%{version}-%{release}
173
174 %description -n perl-cups
175 Perl module for Common Unix Printing System.
176
177 %description -n perl-cups -l pl
178 Modu³ Perla do Popularnego Systemu Druku dla Uniksa.
179
180 %package -n php-cups
181 Summary:        PHP module for CUPS
182 Summary(pl):    Modu³ PHP CUPS
183 Group:          Development/Languages/PHP
184 Requires:       %{name}-lib = %{epoch}:%{version}-%{release}
185
186 %description -n php-cups
187 PHP module for Common Unix Printing System.
188
189 %description -n php-cups -l pl
190 Modu³ PHP do Popularnego Systemu Druku dla Uniksa.
191
192 %package backend-usb
193 Summary:        USB backend for CUPS
194 Summary(pl):    Backend USB dla CUPS-a
195 Group:          Applications/Printing
196 Requires:       %{name} = %{epoch}:%{version}-%{release}
197
198 %description backend-usb
199 This package allow CUPS printing on USB printers.
200
201 %description backend-usb -l pl
202 Ten pakiet umo¿liwia drukowanie z poziomu CUPS-a na drukarkach USB.
203
204 %package backend-serial
205 Summary:        Serial port backend for CUPS
206 Summary(pl):    Backend obs³uguj±cy porty szeregowe dla CUPS-a
207 Group:          Applications/Printing
208 Requires:       %{name} = %{epoch}:%{version}-%{release}
209
210 %description backend-serial
211 This package allow CUPS printing on printers connected by serial
212 ports.
213
214 %description backend-serial -l pl
215 Ten pakiet umo¿liwia drukowanie z poziomu CUPS-a na drukarkach
216 pod³±czonych do portów szeregowych.
217
218 %package backend-parallel
219 Summary:        Parallel port backend for CUPS
220 Summary(pl):    Backend obs³uguj±cy porty równoleg³e dla CUPS-a
221 Group:          Applications/Printing
222 Requires:       %{name} = %{epoch}:%{version}-%{release}
223
224 %description backend-parallel
225 This package allow CUPS printing on printers connected by parallel
226 ports.
227
228 %description backend-parallel -l pl
229 Ten pakiet umo¿liwia drukowanie z poziomu CUPS-a na drukarkach
230 pod³±czonych do portów równoleg³ych.
231
232 %prep
233 %setup -q
234 %patch0 -p1
235 %patch1 -p1
236 %patch2 -p1
237 %patch3 -p1
238 %patch4 -p1
239 %patch5 -p1
240 %patch6 -p1
241 %patch7 -p1
242 %patch8 -p1
243 # wtf?
244 #%patch9 -p1
245 %patch10 -p1
246 %patch11 -p1
247 %patch12 -p1
248
249 %build
250 %{__aclocal}
251 %{__autoconf}
252 %configure \
253         --libdir=%{_ulibdir} \
254         %{?debug:--enable-debug} \
255         --with-docdir=%{_ulibdir}/%{name}/cgi-bin
256 %{__make}
257
258 %{__perl} -pi -e 's#-I\.\.\/\.\.#-I../.. -I../../cups#g' scripting/php/Makefile
259 %{?with_php:%{__make} -C scripting/php}
260
261 %if %{with perl}
262 cd scripting/perl
263 %{__perl} -pi -e 's@-lcups@-L../../cups $1@' Makefile.PL
264 %{__perl} Makefile.PL \
265         INSTALLDIRS=vendor \
266         OPTIMIZE="%{rpmcflags} -I../.."
267 # avoid rpaths generated by MakeMaker
268 %{__perl} -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' Makefile
269
270 %{__make}
271 cd ../..
272 %endif
273
274 %install
275 rm -rf $RPM_BUILD_ROOT
276 install -d $RPM_BUILD_ROOT/etc/{{rc.d/init.d,pam.d,logrotate.d},security} \
277         $RPM_BUILD_ROOT/var/log/{,archiv/}cups
278
279 %{__make} install \
280         BUILDROOT=$RPM_BUILD_ROOT \
281         CUPS_USER=$(id -u) \
282         CUPS_GROUP=$(id -g)
283
284 if [ "%{_lib}" != "lib" ] ; then
285         install -d $RPM_BUILD_ROOT%{_libdir}
286         mv $RPM_BUILD_ROOT%{_ulibdir}/*.so* $RPM_BUILD_ROOT%{_libdir}
287         mv $RPM_BUILD_ROOT%{_ulibdir}/*.a $RPM_BUILD_ROOT%{_libdir}
288 fi
289
290 %if %{with php}
291 %{__make} -C scripting/php install \
292         PHPDIR="$RPM_BUILD_ROOT`php-config --extension-dir`"
293 %endif
294
295 %if %{with perl}
296 cd scripting/perl
297 %{__make} install \
298         DESTDIR=$RPM_BUILD_ROOT
299 cd ../..
300 %endif
301
302 install %{SOURCE1}      $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
303 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/pam.d/%{name}
304 install %{SOURCE3}      $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
305
306 gzip -9nf $RPM_BUILD_ROOT%{_datadir}/%{name}/model/*.ppd
307
308 # for internal HTTP browser:
309 cp doc/*.html   $RPM_BUILD_ROOT%{_ulibdir}/%{name}/cgi-bin
310 cp doc/*.css    $RPM_BUILD_ROOT%{_ulibdir}/%{name}/cgi-bin
311 cp doc/images/* $RPM_BUILD_ROOT%{_ulibdir}/%{name}/cgi-bin/images
312
313 touch $RPM_BUILD_ROOT/var/log/cups/{access_log,error_log,page_log}
314 touch $RPM_BUILD_ROOT/etc/security/blacklist.cups
315
316 # check-files cleanup
317 rm -rf $RPM_BUILD_ROOT%{_mandir}/{,es/,fr/}cat?
318
319 %clean
320 rm -rf $RPM_BUILD_ROOT
321
322 %post
323 /sbin/chkconfig --add cups
324 if [ -f /var/lock/subsys/cups ]; then
325         /etc/rc.d/init.d/cups restart 1>&2
326 else
327         echo "Run \"/etc/rc.d/init.d/cups start\" to start cups daemon."
328 fi
329
330 %preun
331 if [ "$1" = "0" ]; then
332         if [ -f /var/lock/subsys/cups ]; then
333                 /etc/rc.d/init.d/cups stop 1>&2
334         fi
335         /sbin/chkconfig --del cups
336 fi
337
338 %post   lib -p /sbin/ldconfig
339 %postun lib -p /sbin/ldconfig
340 %post   image-lib -p /sbin/ldconfig
341 %postun image-lib -p /sbin/ldconfig
342
343 %files
344 %defattr(644,root,root,755)
345 #%doc *.gz doc/*.html doc/*.css doc/images
346 %doc *.txt
347 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/*
348 %attr(754,root,root) /etc/rc.d/init.d/cups
349 %dir %{_sysconfdir}/%{name}
350 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/classes.conf
351 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/cupsd.conf
352 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/printers.conf
353 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.convs
354 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.types
355 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.cups
356 %dir %{_sysconfdir}/%{name}/certs
357 %dir %{_sysconfdir}/%{name}/interfaces
358 %dir %{_sysconfdir}/%{name}/ppd
359 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/%{name}
360 %attr(4755,lp,root) %{_bindir}/lppasswd
361 %attr(755,root,root) %{_bindir}/cupstestppd
362 %attr(755,root,root) %{_bindir}/disable
363 %attr(755,root,root) %{_bindir}/enable
364 %dir %{_ulibdir}/cups
365 %dir %{_ulibdir}/cups/*
366 %attr(755,root,root) %{_ulibdir}/cups/*/*
367 %exclude %{_ulibdir}/cups/backend/usb
368 %exclude %{_ulibdir}/cups/backend/serial
369 %exclude %{_ulibdir}/cups/backend/parallel
370 %attr(755,root,root) %{_sbindir}/cupsd
371 %{_datadir}/cups
372 %{_mandir}/man1/backend.1*
373 %{_mandir}/man1/cupstestppd.1*
374 %{_mandir}/man1/filter.1*
375 %{_mandir}/man1/lppasswd.1*
376 %{_mandir}/man[58]/*
377 %lang(fr) %{_mandir}/fr/man1/backend.1*
378 %lang(fr) %{_mandir}/fr/man1/cupstestppd.1*
379 %lang(fr) %{_mandir}/fr/man1/filter.1*
380 %lang(fr) %{_mandir}/fr/man1/lppasswd.1*
381 %lang(fr) %{_mandir}/fr/man[58]/*
382 %lang(es) %{_mandir}/es/man1/backend.1*
383 %lang(es) %{_mandir}/es/man1/cupstestppd.1*
384 %lang(es) %{_mandir}/es/man1/filter.1*
385 %lang(es) %{_mandir}/es/man1/lppasswd.1*
386 %lang(es) %{_mandir}/es/man[58]/*
387 %{_datadir}/locale/C/cups_C
388 %lang(be) %{_datadir}/locale/be/cups_be
389 %lang(cs) %{_datadir}/locale/cs/cups_cs
390 %lang(de) %{_datadir}/locale/de/cups_de
391 %{_datadir}/locale/en/cups_en
392 %lang(en_US) %{_datadir}/locale/en_US/cups_en_US
393 %lang(es) %{_datadir}/locale/es/cups_es
394 %lang(fr) %{_datadir}/locale/fr/cups_fr
395 %lang(he) %{_datadir}/locale/he/cups_he
396 %lang(it) %{_datadir}/locale/it/cups_it
397 %lang(ru) %{_datadir}/locale/ru_RU/cups_ru_RU
398 %lang(sv) %{_datadir}/locale/sv/cups_sv
399 %lang(uk) %{_datadir}/locale/uk/cups_uk
400 %lang(uk) %{_datadir}/locale/uk_UA/cups_uk_UA
401 %lang(zh_CN) %{_datadir}/locale/zh_CN/cups_zh_CN
402 /var/spool/cups
403 %attr(750,root,logs) %dir /var/log/archiv/cups
404 %attr(750,root,logs) %dir /var/log/cups
405 %attr(640,root,logs) %ghost /var/log/cups/access_log
406 %attr(640,root,logs) %ghost /var/log/cups/error_log
407 %attr(640,root,logs) %ghost /var/log/cups/page_log
408
409 %files lib
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_libdir}/libcups.so.*
412
413 %files clients
414 %defattr(644,root,root,755)
415 %attr(644,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/client.conf
416 %attr(755,root,root) %{_bindir}/cancel
417 %attr(755,root,root) %{_bindir}/lp
418 %attr(755,root,root) %{_bindir}/lpoptions
419 %attr(755,root,root) %{_bindir}/lpq
420 %attr(755,root,root) %{_bindir}/lpr
421 %attr(755,root,root) %{_bindir}/lprm
422 %attr(755,root,root) %{_bindir}/lpstat
423 %attr(755,root,root) %{_sbindir}/accept
424 %attr(755,root,root) %{_sbindir}/cupsaddsmb
425 %attr(755,root,root) %{_sbindir}/lpadmin
426 %attr(755,root,root) %{_sbindir}/lpc
427 %attr(755,root,root) %{_sbindir}/lpinfo
428 %attr(755,root,root) %{_sbindir}/lpmove
429 %attr(755,root,root) %{_sbindir}/reject
430 %{_mandir}/man1/cancel.1*
431 %{_mandir}/man1/lp.1*
432 %{_mandir}/man1/lpoptions.1*
433 %{_mandir}/man1/lpq.1*
434 %{_mandir}/man1/lpr.1*
435 %{_mandir}/man1/lprm.1*
436 %{_mandir}/man1/lpstat.1*
437 %lang(fr) %{_mandir}/fr/man1/cancel.1*
438 %lang(fr) %{_mandir}/fr/man1/lp.1*
439 %lang(fr) %{_mandir}/fr/man1/lpoptions.1*
440 %lang(fr) %{_mandir}/fr/man1/lpq.1*
441 %lang(fr) %{_mandir}/fr/man1/lpr.1*
442 %lang(fr) %{_mandir}/fr/man1/lprm.1*
443 %lang(fr) %{_mandir}/fr/man1/lpstat.1*
444 %lang(es) %{_mandir}/es/man1/lp.1*
445 %lang(es) %{_mandir}/es/man1/lpoptions.1*
446 %lang(es) %{_mandir}/es/man1/lpq.1*
447 %lang(es) %{_mandir}/es/man1/lpr.1*
448 %lang(es) %{_mandir}/es/man1/lprm.1*
449 %lang(es) %{_mandir}/es/man1/lpstat.1*
450
451 %files image-lib
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/libcupsimage.so.*
454
455 %files devel
456 %defattr(644,root,root,755)
457 %attr(755,root,root) %{_bindir}/cups-config
458 %{_includedir}/cups
459 %{_libdir}/lib*.so
460 %{_mandir}/man1/cups-config*
461 %{_mandir}/man3/*
462 %lang(fr) %{_mandir}/fr/man1/cups-config*
463 %lang(es) %{_mandir}/es/man1/cups-config*
464
465 %files static
466 %defattr(644,root,root,755)
467 %{_libdir}/*.a
468
469 %if %{with perl}
470 %files -n perl-cups
471 %defattr(644,root,root,755)
472 %{perl_vendorarch}/*.pm
473 %dir %{perl_vendorarch}/auto/CUPS
474 %{perl_vendorarch}/auto/CUPS/*.bs
475 %{perl_vendorarch}/auto/CUPS/autosplit.ix
476 %attr(755,root,root) %{perl_vendorarch}/auto/CUPS/*.so
477 %endif
478
479 %if %{with php}
480 %files -n php-cups
481 %defattr(644,root,root,755)
482 %attr(755,root,root) %(php-config --extension-dir)/*
483 %endif
484
485 %files backend-usb
486 %defattr(644,root,root,755)
487 %attr(755,root,root) %{_ulibdir}/cups/backend/usb
488
489 %files backend-serial
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{_ulibdir}/cups/backend/serial
492
493 %files backend-parallel
494 %defattr(644,root,root,755)
495 %attr(755,root,root) %{_ulibdir}/cups/backend/parallel
This page took 0.100552 seconds and 3 git commands to generate.