]> git.pld-linux.org Git - packages/cups.git/blob - cups.spec
799ccc3c6a200a25cbb0d2b95dec6eea726c7a1f
[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 Group:          Applications/Printing
186 Requires:       cups = %{epoch}:%{version}
187
188 %description backend-usb
189 This package allow CUPS printing on USB printers.
190
191 %package backend-serial
192 Summary:        Serial backend for CUPS
193 Group:          Applications/Printing
194 Requires:       cups = %{epoch}:%{version}
195
196 %description backend-serial
197 This package allow CUPS printing on printers connected by serial ports.
198
199 %package backend-parallel
200 Summary:        Parallel backend for CUPS
201 Group:          Applications/Printing
202 Requires:       cups = %{epoch}:%{version}
203
204 %description backend-parallel
205 This package allow CUPS printing on printers connected by parallel ports.
206
207 %prep
208 %setup -q -n %{name}-%{version}%{rcver}
209 %patch0 -p1
210 %patch1 -p1
211 # wtf?
212 #%patch2 -p1
213 %patch3 -p1
214 %patch4 -p1
215 %patch5 -p1
216 %patch6 -p1
217 %patch7 -p1
218 %patch8 -p1
219
220 %build
221 %{__aclocal}
222 %{__autoconf}
223 %configure \
224         --with-docdir=%{_libdir}/%{name}/cgi-bin
225 %{__make}
226
227 perl -pi -e 's#-I\.\.\/\.\.#-I../.. -I../../cups#g' scripting/php/Makefile
228 %{?!_without_php:%{__make} -C scripting/php}
229
230 %if 0%{?!_without_perl:1}
231 cd scripting/perl
232 %{__perl} -pi -e 's@-lcups@-L../../cups $1@' Makefile.PL
233 %{__perl} Makefile.PL \
234         INSTALLDIRS=vendor \
235         OPTIMIZE="%{rpmcflags} -I../.."
236 # avoid rpaths generated by MakeMaker
237 perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' Makefile
238
239 %{__make}
240 cd ../..
241 %endif
242
243 %install
244 rm -rf $RPM_BUILD_ROOT
245 install -d $RPM_BUILD_ROOT/etc/{{rc.d/init.d,pam.d,logrotate.d},security} \
246         $RPM_BUILD_ROOT/var/log/{,archiv/}cups
247
248 %{__make} install \
249         DESTDIR=$RPM_BUILD_ROOT
250
251 %if 0%{?!_without_php:1}
252 %{__make} -C scripting/php install \
253         PHPDIR="$RPM_BUILD_ROOT`php-config --extension-dir`"
254 %endif
255
256 %if 0%{?!_without_perl:1}
257 cd scripting/perl
258 %{__make} install \
259         DESTDIR=$RPM_BUILD_ROOT
260 cd ../..
261 %endif
262
263 install %{SOURCE1}      $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
264 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/pam.d/%{name}
265 install %{SOURCE3}      $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
266
267 # for internal http browser:
268 cp doc/*.html   $RPM_BUILD_ROOT%{_libdir}/%{name}/cgi-bin
269 cp doc/*.css    $RPM_BUILD_ROOT%{_libdir}/%{name}/cgi-bin
270 cp doc/images/* $RPM_BUILD_ROOT%{_libdir}/%{name}/cgi-bin/images
271
272 touch $RPM_BUILD_ROOT/var/log/cups/{access_log,error_log,page_log}
273 touch $RPM_BUILD_ROOT/etc/security/blacklist.cups
274
275 # check-files cleanup
276 rm -rf $RPM_BUILD_ROOT%{_mandir}/{,fr/}cat?
277
278 %clean
279 rm -rf $RPM_BUILD_ROOT
280
281 %post
282 /sbin/chkconfig --add cups
283 if [ -f /var/lock/subsys/cupsd ]; then
284         /etc/rc.d/init.d/cups restart 1>&2
285 else
286         echo "Run \"/etc/rc.d/init.d/cups start\" to start cups daemon."
287 fi
288
289 %preun
290 if [ "$1" = "0" ]; then
291         if [ -f /var/lock/subsys/cupsd ]; then
292                 /etc/rc.d/init.d/cups stop 1>&2
293         fi
294         /sbin/chkconfig --del cups
295 fi
296
297 %post   lib -p /sbin/ldconfig
298 %postun lib -p /sbin/ldconfig
299 %post   image-lib -p /sbin/ldconfig
300 %postun image-lib -p /sbin/ldconfig
301
302 %files
303 %defattr(644,root,root,755)
304 #%doc *.gz doc/*.html doc/*.css doc/images
305 %doc *.txt
306 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/*
307 %attr(754,root,root) /etc/rc.d/init.d/cups
308 %dir %{_sysconfdir}/%{name}
309 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/classes.conf
310 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/cupsd.conf
311 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/printers.conf
312 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.convs
313 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.types
314 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.cups
315 %dir %{_sysconfdir}/%{name}/certs
316 %dir %{_sysconfdir}/%{name}/interfaces
317 %dir %{_sysconfdir}/%{name}/ppd
318 %attr(644,root,root) /etc/logrotate.d/%{name}
319 %attr(4755,lp,root) %{_bindir}/lppasswd
320 %attr(755,root,root) %{_bindir}/cupstestppd
321 %attr(755,root,root) %{_bindir}/disable
322 %attr(755,root,root) %{_bindir}/enable
323 %dir %{_libdir}/cups
324 %dir %{_libdir}/cups/*
325 %attr(755,root,root) %{_libdir}/cups/*/*
326 %exclude %{_libdir}/cups/backend/usb
327 %exclude %{_libdir}/cups/backend/serial
328 %exclude %{_libdir}/cups/backend/parallel
329 %attr(755,root,root) %{_sbindir}/*
330 %{_datadir}/cups
331 %{_mandir}/man1/backend.1*
332 %{_mandir}/man1/cupstestppd.1*
333 %{_mandir}/man1/filter.1*
334 %{_mandir}/man1/lppasswd.1*
335 %{_mandir}/man[58]/*
336 %lang(fr) %{_mandir}/fr/man1/backend.1*
337 %lang(fr) %{_mandir}/fr/man1/cupstestppd.1*
338 %lang(fr) %{_mandir}/fr/man1/filter.1*
339 %lang(fr) %{_mandir}/fr/man1/lppasswd.1*
340 %lang(fr) %{_mandir}/fr/man[58]/*
341 %{_datadir}/locale/C/cups_C
342 %lang(be) %{_datadir}/locale/be/cups_be
343 %lang(cs) %{_datadir}/locale/cs/cups_cs
344 %lang(de) %{_datadir}/locale/de/cups_de
345 %{_datadir}/locale/en/cups_en
346 %lang(en_US) %{_datadir}/locale/en_US/cups_en_US
347 %lang(es) %{_datadir}/locale/es/cups_es
348 %lang(fr) %{_datadir}/locale/fr/cups_fr
349 %lang(he) %{_datadir}/locale/he/cups_he
350 %lang(it) %{_datadir}/locale/it/cups_it
351 %lang(ru) %{_datadir}/locale/ru_RU/cups_ru_RU
352 %lang(sv) %{_datadir}/locale/sv/cups_sv
353 %lang(uk) %{_datadir}/locale/uk/cups_uk
354 %lang(uk) %{_datadir}/locale/uk_UA/cups_uk_UA
355 %lang(zh_CN) %{_datadir}/locale/zh_CN/cups_zh_CN
356 /var/spool/cups
357 %attr(750,root,root) %dir /var/log/archiv/cups
358 %attr(750,root,root) %dir /var/log/cups
359 %attr(640,root,root) %ghost /var/log/cups/access_log
360 %attr(640,root,root) %ghost /var/log/cups/error_log
361 %attr(640,root,root) %ghost /var/log/cups/page_log
362
363 %files lib
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libdir}/libcups.so.*
366
367 %files clients
368 %defattr(644,root,root,755)
369 %attr(644,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/client.conf
370 %attr(755,root,root) %{_bindir}/cancel
371 %attr(755,root,root) %{_bindir}/lp
372 %attr(755,root,root) %{_bindir}/lpoptions
373 %attr(755,root,root) %{_bindir}/lpq
374 %attr(755,root,root) %{_bindir}/lpr
375 %attr(755,root,root) %{_bindir}/lprm
376 %attr(755,root,root) %{_bindir}/lpstat
377 %{_mandir}/man1/cancel.1*
378 %{_mandir}/man1/lp.1*
379 %{_mandir}/man1/lpoptions.1*
380 %{_mandir}/man1/lpq.1*
381 %{_mandir}/man1/lpr.1*
382 %{_mandir}/man1/lprm.1*
383 %{_mandir}/man1/lpstat.1*
384 %lang(fr) %{_mandir}/fr/man1/cancel.1*
385 %lang(fr) %{_mandir}/fr/man1/lp.1*
386 %lang(fr) %{_mandir}/fr/man1/lpoptions.1*
387 %lang(fr) %{_mandir}/fr/man1/lpq.1*
388 %lang(fr) %{_mandir}/fr/man1/lpr.1*
389 %lang(fr) %{_mandir}/fr/man1/lprm.1*
390 %lang(fr) %{_mandir}/fr/man1/lpstat.1*
391
392 %files image-lib
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/libcupsimage.so.*
395
396 %files devel
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_bindir}/cups-config
399 %{_includedir}/cups
400 %{_libdir}/lib*.so
401 %{_mandir}/man3/*
402 %lang(fr) %{_mandir}/fr/man3/*
403
404 %files static
405 %defattr(644,root,root,755)
406 %{_libdir}/*.a
407
408 %if 0%{?!_without_perl:1}
409 %files -n perl-cups
410 %defattr(644,root,root,755)
411 %{perl_vendorarch}/*.pm
412 %dir %{perl_vendorarch}/auto/CUPS
413 %{perl_vendorarch}/auto/CUPS/*.bs
414 %{perl_vendorarch}/auto/CUPS/autosplit.ix
415 %attr(755,root,root) %{perl_vendorarch}/auto/CUPS/*.so
416 %endif
417
418 %if 0%{?!_without_php:1}
419 %files -n php-cups
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %(php-config --extension-dir)/*
422 %endif
423
424 %files backend-usb
425 %defattr(644,root,root,755)
426 %attr(755,root,root) %{_libdir}/cups/backend/usb
427
428 %files backend-serial
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/cups/backend/serial
431
432 %files backend-parallel
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/cups/backend/parallel
This page took 0.087262 seconds and 3 git commands to generate.