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