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