]> git.pld-linux.org Git - packages/cups.git/blob - cups.spec
- url which df can understand
[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 %define rcver   rc1
16 Version:        1.1.21
17 Release:        0.%{rcver}.1
18 Epoch:          1
19 License:        GPL/LGPL
20 Group:          Applications/Printing
21 Source0:        ftp://ftp.easysw.com/pub/%{name}/test/%{name}-%{version}%{rcver}-source.tar.bz2
22 # Source0-md5:  3cf609727cbf8d8c097d16100be58a28
23 Source1:        %{name}.init
24 Source2:        %{name}.pamd
25 Source3:        %{name}.logrotate
26 Patch0:         %{name}-DESTDIR.patch
27 Patch1:         %{name}-config.patch
28 Patch2:         %{name}-tmpdir.patch
29 Patch3:         %{name}-lp-lpr.patch
30 Patch4:         %{name}-options.patch
31 Patch5:         %{name}-ENCRYPTIONtxt.patch
32 Patch6:         %{name}-man_pages_linking.patch
33 Patch7:         %{name}-nolibs.patch
34 Patch8:         %{name}-chown.patch
35 Patch9:         %{name}-nostrip.patch
36 Patch10:        %{name}-rpath.patch
37 Patch11:        %{name}-gcc34.patch
38 URL:            http://www.cups.org/
39 BuildRequires:  autoconf
40 BuildRequires:  automake
41 BuildRequires:  libjpeg-devel
42 BuildRequires:  libpng-devel
43 BuildRequires:  libtiff-devel
44 BuildRequires:  openslp-devel
45 BuildRequires:  openssl-devel >= 0.9.7d
46 BuildRequires:  pam-devel
47 %{?with_php:BuildRequires:      php-devel}
48 BuildRequires:  pkgconfig
49 BuildRequires:  rpm-perlprov
50 PreReq:         %{name}-libs = %{epoch}:%{version}
51 Requires(post,preun):   /sbin/chkconfig
52 Requires:       pam >= 0.77.3
53 Conflicts:      ghostscript < 7.05.4
54 Obsoletes:      lpr
55 Obsoletes:      LPRng
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %define         _ulibdir        %{_prefix}/lib
59
60 %description
61 CUPS provides a portable printing layer for UNIX®-based operating
62 systems. It has been developed by Easy Software Products to promote a
63 standard printing solution for all UNIX vendors and users. CUPS
64 provides the System V and Berkeley command-line interfaces. CUPS uses
65 the Internet Printing Protocol ("IPP") as the basis for managing print
66 jobs and queues. The Line Printer Daemon ("LPD") Server Message Block
67 ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are also supported
68 with reduced functionality. CUPS adds network printer browsing and
69 PostScript Printer Description ("PPD") based printing options to
70 support real-world printing under UNIX.
71
72 %description -l pl
73 CUPS dostarcza standardowy poziom drukowania dla systemów uniksowych.
74 CUPS u¿ywa protoko³u IPP - Internet Printint Protocol jako podstawy do
75 zarz±dzania zadaniami i kolejkami druku.
76
77 %description -l pt_BR
78 O sistema Unix de impressão (CUPS) fornece uma camada de impressão
79 portável para os sistemas operacionais baseados no UNIX®.
80
81 %package lib
82 Summary:        Common Unix Printing System Libraries
83 Summary(pl):    Biblioteki dla CUPS
84 Summary(pt_BR): Sistema Unix de Impressão - bibliotecas para uso em clientes cups
85 Group:          Libraries
86 Provides:       %{name}-libs = %{epoch}:%{version}-%{release}
87 Obsoletes:      %{name}-libs
88 Obsoletes:      libcups1
89
90 %description lib
91 Common Unix Printing System Libraries.
92
93 %description lib -l pl
94 Biblioteki dla CUPS.
95
96 %description lib -l pt_BR
97 Bibliotecas CUPS requeridas pelos clientes CUPS.
98
99 %package clients
100 Summary:        Common Unix Printing System Clients
101 Summary(pl):    Aplikacje klienckie dla CUPS
102 Group:          Applications/Printing
103 Provides:       %{name}-clients = %{epoch}:%{version}-%{release}
104 Conflicts:      LPRng
105
106 %description clients
107 Common Unix Printing System Clients.
108
109 %description clients -l pl
110 Aplikacje klienckie dla CUPS.
111
112 %package image-lib
113 Summary:        Common Unix Printing System Libraries - images manipulation
114 Summary(pl):    Biblioteki dla CUPS - obs³uga formatów graficznych
115 Summary(pt_BR): Sistema Unix de Impressão - bibliotecas para uso em clientes cups
116 Group:          Libraries
117 Requires:       %{name}-lib = %{epoch}:%{version}-%{release}
118 Obsoletes:      libcups1
119
120 %description image-lib
121 Common Unix Printing System Libraries - images manupalation.
122
123 %description image-lib -l pl
124 Biblioteki dla CUPS - obs³uga formatów graficznych.
125
126 %description image-lib -l pt_BR
127 Bibliotecas CUPS requeridas pelos clientes CUPS.
128
129 %package devel
130 Summary:        Common Unix Printing System development files
131 Summary(pl):    Popularny System Druku dla Uniksa, pliki nag³ówkowe
132 Summary(pt_BR): Sistema Unix de Impressão - ambiente de desenvolvimento
133 Group:          Development/Libraries
134 Requires:       %{name}-image-lib = %{epoch}:%{version}
135 Requires:       %{name}-lib = %{epoch}:%{version}
136 Obsoletes:      libcups1-devel
137
138 %description devel
139 Common Unix Printing System development files.
140
141 %description devel -l pl
142 Popularny System Druku dla Uniksa, pliki nag³ówkowe.
143
144 %description devel -l pt_BR
145 Este pacote é um adicional que contem um ambiente de desenvolvimento
146 para a criação de suporte a novas impressoras e novos serviços ao
147 CUPS.
148
149 %package static
150 Summary:        Common Unix Printing System static libraries
151 Summary(pl):    Popularny System Druku dla Uniksa, biblioteki statyczne
152 Summary(pt_BR): Common Unix Printing System - bibliotecas estáticas
153 Group:          Development/Libraries
154 Requires:       %{name}-devel = %{epoch}:%{version}
155
156 %description static
157 Common Unix Printing System static libraries.
158
159 %description static -l pl
160 Popularny System Druku dla Uniksa, biblioteki statyczne.
161
162 %description static -l pt_BR
163 Bibliotecas estáticas para desenvolvimento de programas que usam as
164 bibliotecas do CUPS.
165
166 %package -n perl-cups
167 Summary:        Perl module for CUPS
168 Summary(pl):    Modu³ Perla CUPS
169 Group:          Development/Languages/Perl
170 Requires:       cups-lib = %{epoch}:%{version}
171
172 %description -n perl-cups
173 Perl module for Common Unix Printing System.
174
175 %description -n perl-cups -l pl
176 Modu³ Perla do Popularnego Systemu Druku dla Uniksa.
177
178 %package -n php-cups
179 Summary:        PHP module for CUPS
180 Summary(pl):    Modu³ PHP CUPS
181 Group:          Development/Languages/PHP
182 Requires:       cups-lib = %{epoch}:%{version}
183
184 %description -n php-cups
185 PHP module for Common Unix Printing System.
186
187 %description -n php-cups -l pl
188 Modu³ PHP do Popularnego Systemu Druku dla Uniksa.
189
190 %package backend-usb
191 Summary:        USB backend for CUPS
192 Summary(pl):    Backend USB dla CUPS-a
193 Group:          Applications/Printing
194 Requires:       cups = %{epoch}:%{version}
195
196 %description backend-usb
197 This package allow CUPS printing on USB printers.
198
199 %description backend-usb -l pl
200 Ten pakiet umo¿liwia drukowanie z poziomu CUPS-a na drukarkach USB.
201
202 %package backend-serial
203 Summary:        Serial port backend for CUPS
204 Summary(pl):    Backend obs³uguj±cy porty szeregowe dla CUPS-a
205 Group:          Applications/Printing
206 Requires:       cups = %{epoch}:%{version}
207
208 %description backend-serial
209 This package allow CUPS printing on printers connected by serial
210 ports.
211
212 %description backend-serial -l pl
213 Ten pakiet umo¿liwia drukowanie z poziomu CUPS-a na drukarkach
214 pod³±czonych do portów szeregowych.
215
216 %package backend-parallel
217 Summary:        Parallel port backend for CUPS
218 Summary(pl):    Backend obs³uguj±cy porty równoleg³e dla CUPS-a
219 Group:          Applications/Printing
220 Requires:       cups = %{epoch}:%{version}
221
222 %description backend-parallel
223 This package allow CUPS printing on printers connected by parallel
224 ports.
225
226 %description backend-parallel -l pl
227 Ten pakiet umo¿liwia drukowanie z poziomu CUPS-a na drukarkach
228 pod³±czonych do portów równoleg³ych.
229
230 %prep
231 %setup -q -n %{name}-%{version}%{rcver}
232 %patch0 -p1
233 %patch1 -p1
234 # wtf?
235 #%patch2 -p1
236 %patch3 -p1
237 %patch4 -p1
238 %patch5 -p1
239 %patch6 -p1
240 %patch7 -p1
241 %patch8 -p1
242 %patch9 -p1
243 %patch10 -p1
244 %patch11 -p1
245
246 %build
247 %{__aclocal}
248 %{__autoconf}
249 %configure \
250         --libdir=%{_ulibdir} \
251         --with-docdir=%{_ulibdir}/%{name}/cgi-bin
252 %{__make}
253
254 perl -pi -e 's#-I\.\.\/\.\.#-I../.. -I../../cups#g' scripting/php/Makefile
255 %{?with_php:%{__make} -C scripting/php}
256
257 %if %{with perl}
258 cd scripting/perl
259 %{__perl} -pi -e 's@-lcups@-L../../cups $1@' Makefile.PL
260 %{__perl} Makefile.PL \
261         INSTALLDIRS=vendor \
262         OPTIMIZE="%{rpmcflags} -I../.."
263 # avoid rpaths generated by MakeMaker
264 perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' Makefile
265
266 %{__make}
267 cd ../..
268 %endif
269
270 %install
271 rm -rf $RPM_BUILD_ROOT
272 install -d $RPM_BUILD_ROOT/etc/{{rc.d/init.d,pam.d,logrotate.d},security} \
273         $RPM_BUILD_ROOT/var/log/{,archiv/}cups
274
275 %{__make} install \
276         DESTDIR=$RPM_BUILD_ROOT
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 # 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/etc/security/blacklist.cups
307
308 # check-files cleanup
309 rm -rf $RPM_BUILD_ROOT%{_mandir}/{,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(644,root,root) /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 %{_datadir}/locale/C/cups_C
375 %lang(be) %{_datadir}/locale/be/cups_be
376 %lang(cs) %{_datadir}/locale/cs/cups_cs
377 %lang(de) %{_datadir}/locale/de/cups_de
378 %{_datadir}/locale/en/cups_en
379 %lang(en_US) %{_datadir}/locale/en_US/cups_en_US
380 %lang(es) %{_datadir}/locale/es/cups_es
381 %lang(fr) %{_datadir}/locale/fr/cups_fr
382 %lang(he) %{_datadir}/locale/he/cups_he
383 %lang(it) %{_datadir}/locale/it/cups_it
384 %lang(ru) %{_datadir}/locale/ru_RU/cups_ru_RU
385 %lang(sv) %{_datadir}/locale/sv/cups_sv
386 %lang(uk) %{_datadir}/locale/uk/cups_uk
387 %lang(uk) %{_datadir}/locale/uk_UA/cups_uk_UA
388 %lang(zh_CN) %{_datadir}/locale/zh_CN/cups_zh_CN
389 /var/spool/cups
390 %attr(750,root,root) %dir /var/log/archiv/cups
391 %attr(750,root,root) %dir /var/log/cups
392 %attr(640,root,root) %ghost /var/log/cups/access_log
393 %attr(640,root,root) %ghost /var/log/cups/error_log
394 %attr(640,root,root) %ghost /var/log/cups/page_log
395
396 %files lib
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_libdir}/libcups.so.*
399
400 %files clients
401 %defattr(644,root,root,755)
402 %attr(644,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/client.conf
403 %attr(755,root,root) %{_bindir}/cancel
404 %attr(755,root,root) %{_bindir}/lp
405 %attr(755,root,root) %{_bindir}/lpoptions
406 %attr(755,root,root) %{_bindir}/lpq
407 %attr(755,root,root) %{_bindir}/lpr
408 %attr(755,root,root) %{_bindir}/lprm
409 %attr(755,root,root) %{_bindir}/lpstat
410 %attr(755,root,root) %{_sbindir}/accept
411 %attr(755,root,root) %{_sbindir}/cupsaddsmb
412 %attr(755,root,root) %{_sbindir}/lpadmin
413 %attr(755,root,root) %{_sbindir}/lpc
414 %attr(755,root,root) %{_sbindir}/lpinfo
415 %attr(755,root,root) %{_sbindir}/lpmove
416 %attr(755,root,root) %{_sbindir}/reject
417 %{_mandir}/man1/cancel.1*
418 %{_mandir}/man1/lp.1*
419 %{_mandir}/man1/lpoptions.1*
420 %{_mandir}/man1/lpq.1*
421 %{_mandir}/man1/lpr.1*
422 %{_mandir}/man1/lprm.1*
423 %{_mandir}/man1/lpstat.1*
424 %lang(fr) %{_mandir}/fr/man1/cancel.1*
425 %lang(fr) %{_mandir}/fr/man1/lp.1*
426 %lang(fr) %{_mandir}/fr/man1/lpoptions.1*
427 %lang(fr) %{_mandir}/fr/man1/lpq.1*
428 %lang(fr) %{_mandir}/fr/man1/lpr.1*
429 %lang(fr) %{_mandir}/fr/man1/lprm.1*
430 %lang(fr) %{_mandir}/fr/man1/lpstat.1*
431
432 %files image-lib
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/libcupsimage.so.*
435
436 %files devel
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_bindir}/cups-config
439 %{_includedir}/cups
440 %{_libdir}/lib*.so
441 %{_mandir}/man1/cups-config*
442 %{_mandir}/man3/*
443 %lang(fr) %{_mandir}/fr/man1/cups-config*
444
445 %files static
446 %defattr(644,root,root,755)
447 %{_libdir}/*.a
448
449 %if %{with perl}
450 %files -n perl-cups
451 %defattr(644,root,root,755)
452 %{perl_vendorarch}/*.pm
453 %dir %{perl_vendorarch}/auto/CUPS
454 %{perl_vendorarch}/auto/CUPS/*.bs
455 %{perl_vendorarch}/auto/CUPS/autosplit.ix
456 %attr(755,root,root) %{perl_vendorarch}/auto/CUPS/*.so
457 %endif
458
459 %if %{with php}
460 %files -n php-cups
461 %defattr(644,root,root,755)
462 %attr(755,root,root) %(php-config --extension-dir)/*
463 %endif
464
465 %files backend-usb
466 %defattr(644,root,root,755)
467 %attr(755,root,root) %{_ulibdir}/cups/backend/usb
468
469 %files backend-serial
470 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_ulibdir}/cups/backend/serial
472
473 %files backend-parallel
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_ulibdir}/cups/backend/parallel
This page took 0.252705 seconds and 3 git commands to generate.