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