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