]> git.pld-linux.org Git - packages/cups.git/blob - cups.spec
200199665882075d510cae5f3960017a4e851d94
[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         %{?debug:--enable-debug} \
250         --with-docdir=%{_ulibdir}/%{name}/cgi-bin
251 %{__make}
252
253 %{__perl} -pi -e 's#-I\.\.\/\.\.#-I../.. -I../../cups#g' scripting/php/Makefile
254 %{?with_php:%{__make} -C scripting/php}
255
256 %if %{with perl}
257 cd scripting/perl
258 %{__perl} -pi -e 's@-lcups@-L../../cups $1@' Makefile.PL
259 %{__perl} Makefile.PL \
260         INSTALLDIRS=vendor \
261         OPTIMIZE="%{rpmcflags} -I../.."
262 # avoid rpaths generated by MakeMaker
263 %{__perl} -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' Makefile
264
265 %{__make}
266 cd ../..
267 %endif
268
269 %install
270 rm -rf $RPM_BUILD_ROOT
271 install -d $RPM_BUILD_ROOT/etc/{{rc.d/init.d,pam.d,logrotate.d},security} \
272         $RPM_BUILD_ROOT/var/log/{,archiv/}cups
273
274 %{__make} install \
275         BUILDROOT=$RPM_BUILD_ROOT \
276         CUPS_USER=$(id -u) \
277         CUPS_GROUP=$(id -g)
278
279 if [ "%{_lib}" != "lib" ] ; then
280         install -d $RPM_BUILD_ROOT%{_libdir}
281         mv $RPM_BUILD_ROOT%{_ulibdir}/*.so* $RPM_BUILD_ROOT%{_libdir}
282         mv $RPM_BUILD_ROOT%{_ulibdir}/*.a $RPM_BUILD_ROOT%{_libdir}
283 fi
284
285 %if %{with php}
286 %{__make} -C scripting/php install \
287         PHPDIR="$RPM_BUILD_ROOT`php-config --extension-dir`"
288 %endif
289
290 %if %{with perl}
291 cd scripting/perl
292 %{__make} install \
293         DESTDIR=$RPM_BUILD_ROOT
294 cd ../..
295 %endif
296
297 install %{SOURCE1}      $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
298 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/pam.d/%{name}
299 install %{SOURCE3}      $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
300
301 gzip -9nf $RPM_BUILD_ROOT%{_datadir}/%{name}/model/*.ppd
302
303 # for internal HTTP browser:
304 cp doc/*.html   $RPM_BUILD_ROOT%{_ulibdir}/%{name}/cgi-bin
305 cp doc/*.css    $RPM_BUILD_ROOT%{_ulibdir}/%{name}/cgi-bin
306 cp doc/images/* $RPM_BUILD_ROOT%{_ulibdir}/%{name}/cgi-bin/images
307
308 touch $RPM_BUILD_ROOT/var/log/cups/{access_log,error_log,page_log}
309 touch $RPM_BUILD_ROOT/etc/security/blacklist.cups
310
311 # check-files cleanup
312 rm -rf $RPM_BUILD_ROOT%{_mandir}/{,es/,fr/}cat?
313
314 %clean
315 rm -rf $RPM_BUILD_ROOT
316
317 %post
318 /sbin/chkconfig --add cups
319 if [ -f /var/lock/subsys/cups ]; then
320         /etc/rc.d/init.d/cups restart 1>&2
321 else
322         echo "Run \"/etc/rc.d/init.d/cups start\" to start cups daemon."
323 fi
324
325 %preun
326 if [ "$1" = "0" ]; then
327         if [ -f /var/lock/subsys/cups ]; then
328                 /etc/rc.d/init.d/cups stop 1>&2
329         fi
330         /sbin/chkconfig --del cups
331 fi
332
333 %post   lib -p /sbin/ldconfig
334 %postun lib -p /sbin/ldconfig
335 %post   image-lib -p /sbin/ldconfig
336 %postun image-lib -p /sbin/ldconfig
337
338 %files
339 %defattr(644,root,root,755)
340 #%doc *.gz doc/*.html doc/*.css doc/images
341 %doc *.txt
342 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/*
343 %attr(754,root,root) /etc/rc.d/init.d/cups
344 %dir %{_sysconfdir}/%{name}
345 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/classes.conf
346 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/cupsd.conf
347 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/printers.conf
348 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.convs
349 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.types
350 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.cups
351 %dir %{_sysconfdir}/%{name}/certs
352 %dir %{_sysconfdir}/%{name}/interfaces
353 %dir %{_sysconfdir}/%{name}/ppd
354 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/%{name}
355 %attr(4755,lp,root) %{_bindir}/lppasswd
356 %attr(755,root,root) %{_bindir}/cupstestppd
357 %attr(755,root,root) %{_bindir}/disable
358 %attr(755,root,root) %{_bindir}/enable
359 %dir %{_ulibdir}/cups
360 %dir %{_ulibdir}/cups/*
361 %attr(755,root,root) %{_ulibdir}/cups/*/*
362 %exclude %{_ulibdir}/cups/backend/usb
363 %exclude %{_ulibdir}/cups/backend/serial
364 %exclude %{_ulibdir}/cups/backend/parallel
365 %attr(755,root,root) %{_sbindir}/cupsd
366 %{_datadir}/cups
367 %{_mandir}/man1/backend.1*
368 %{_mandir}/man1/cupstestppd.1*
369 %{_mandir}/man1/filter.1*
370 %{_mandir}/man1/lppasswd.1*
371 %{_mandir}/man[58]/*
372 %lang(fr) %{_mandir}/fr/man1/backend.1*
373 %lang(fr) %{_mandir}/fr/man1/cupstestppd.1*
374 %lang(fr) %{_mandir}/fr/man1/filter.1*
375 %lang(fr) %{_mandir}/fr/man1/lppasswd.1*
376 %lang(fr) %{_mandir}/fr/man[58]/*
377 %lang(es) %{_mandir}/es/man1/backend.1*
378 %lang(es) %{_mandir}/es/man1/cupstestppd.1*
379 %lang(es) %{_mandir}/es/man1/filter.1*
380 %lang(es) %{_mandir}/es/man1/lppasswd.1*
381 %lang(es) %{_mandir}/es/man[58]/*
382 %{_datadir}/locale/C/cups_C
383 %lang(be) %{_datadir}/locale/be/cups_be
384 %lang(cs) %{_datadir}/locale/cs/cups_cs
385 %lang(de) %{_datadir}/locale/de/cups_de
386 %{_datadir}/locale/en/cups_en
387 %lang(en_US) %{_datadir}/locale/en_US/cups_en_US
388 %lang(es) %{_datadir}/locale/es/cups_es
389 %lang(fr) %{_datadir}/locale/fr/cups_fr
390 %lang(he) %{_datadir}/locale/he/cups_he
391 %lang(it) %{_datadir}/locale/it/cups_it
392 %lang(ru) %{_datadir}/locale/ru_RU/cups_ru_RU
393 %lang(sv) %{_datadir}/locale/sv/cups_sv
394 %lang(uk) %{_datadir}/locale/uk/cups_uk
395 %lang(uk) %{_datadir}/locale/uk_UA/cups_uk_UA
396 %lang(zh_CN) %{_datadir}/locale/zh_CN/cups_zh_CN
397 /var/spool/cups
398 %attr(750,root,logs) %dir /var/log/archiv/cups
399 %attr(750,root,logs) %dir /var/log/cups
400 %attr(640,root,logs) %ghost /var/log/cups/access_log
401 %attr(640,root,logs) %ghost /var/log/cups/error_log
402 %attr(640,root,logs) %ghost /var/log/cups/page_log
403
404 %files lib
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_libdir}/libcups.so.*
407
408 %files clients
409 %defattr(644,root,root,755)
410 %attr(644,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/client.conf
411 %attr(755,root,root) %{_bindir}/cancel
412 %attr(755,root,root) %{_bindir}/lp
413 %attr(755,root,root) %{_bindir}/lpoptions
414 %attr(755,root,root) %{_bindir}/lpq
415 %attr(755,root,root) %{_bindir}/lpr
416 %attr(755,root,root) %{_bindir}/lprm
417 %attr(755,root,root) %{_bindir}/lpstat
418 %attr(755,root,root) %{_sbindir}/accept
419 %attr(755,root,root) %{_sbindir}/cupsaddsmb
420 %attr(755,root,root) %{_sbindir}/lpadmin
421 %attr(755,root,root) %{_sbindir}/lpc
422 %attr(755,root,root) %{_sbindir}/lpinfo
423 %attr(755,root,root) %{_sbindir}/lpmove
424 %attr(755,root,root) %{_sbindir}/reject
425 %{_mandir}/man1/cancel.1*
426 %{_mandir}/man1/lp.1*
427 %{_mandir}/man1/lpoptions.1*
428 %{_mandir}/man1/lpq.1*
429 %{_mandir}/man1/lpr.1*
430 %{_mandir}/man1/lprm.1*
431 %{_mandir}/man1/lpstat.1*
432 %lang(fr) %{_mandir}/fr/man1/cancel.1*
433 %lang(fr) %{_mandir}/fr/man1/lp.1*
434 %lang(fr) %{_mandir}/fr/man1/lpoptions.1*
435 %lang(fr) %{_mandir}/fr/man1/lpq.1*
436 %lang(fr) %{_mandir}/fr/man1/lpr.1*
437 %lang(fr) %{_mandir}/fr/man1/lprm.1*
438 %lang(fr) %{_mandir}/fr/man1/lpstat.1*
439 %lang(es) %{_mandir}/es/man1/lp.1*
440 %lang(es) %{_mandir}/es/man1/lpoptions.1*
441 %lang(es) %{_mandir}/es/man1/lpq.1*
442 %lang(es) %{_mandir}/es/man1/lpr.1*
443 %lang(es) %{_mandir}/es/man1/lprm.1*
444 %lang(es) %{_mandir}/es/man1/lpstat.1*
445
446 %files image-lib
447 %defattr(644,root,root,755)
448 %attr(755,root,root) %{_libdir}/libcupsimage.so.*
449
450 %files devel
451 %defattr(644,root,root,755)
452 %attr(755,root,root) %{_bindir}/cups-config
453 %{_includedir}/cups
454 %{_libdir}/lib*.so
455 %{_mandir}/man1/cups-config*
456 %{_mandir}/man3/*
457 %lang(fr) %{_mandir}/fr/man1/cups-config*
458 %lang(es) %{_mandir}/es/man1/cups-config*
459
460 %files static
461 %defattr(644,root,root,755)
462 %{_libdir}/*.a
463
464 %if %{with perl}
465 %files -n perl-cups
466 %defattr(644,root,root,755)
467 %{perl_vendorarch}/*.pm
468 %dir %{perl_vendorarch}/auto/CUPS
469 %{perl_vendorarch}/auto/CUPS/*.bs
470 %{perl_vendorarch}/auto/CUPS/autosplit.ix
471 %attr(755,root,root) %{perl_vendorarch}/auto/CUPS/*.so
472 %endif
473
474 %if %{with php}
475 %files -n php-cups
476 %defattr(644,root,root,755)
477 %attr(755,root,root) %(php-config --extension-dir)/*
478 %endif
479
480 %files backend-usb
481 %defattr(644,root,root,755)
482 %attr(755,root,root) %{_ulibdir}/cups/backend/usb
483
484 %files backend-serial
485 %defattr(644,root,root,755)
486 %attr(755,root,root) %{_ulibdir}/cups/backend/serial
487
488 %files backend-parallel
489 %defattr(644,root,root,755)
490 %attr(755,root,root) %{_ulibdir}/cups/backend/parallel
This page took 0.068373 seconds and 3 git commands to generate.