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