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