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