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