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