]>
Commit | Line | Data |
---|---|---|
3540b403 | 1 | # |
7be5c8e8 | 2 | # Conditional build: |
373aff1e | 3 | %bcond_with gnutls # use GNU TLS for SSL/TLS support (instead of OpenSSL) |
ceddaf82 | 4 | %bcond_without dnssd |
84d9a886 JR |
5 | %bcond_without php # don't build PHP extension/support in web interface |
6 | %bcond_without perl # don't build Perl extension/support in web interface | |
84d9a886 | 7 | %bcond_without python # don't build Python support in web interface |
373aff1e | 8 | %bcond_without static_libs # don't build static library |
7be5c8e8 | 9 | # |
7be5c8e8 | 10 | %include /usr/lib/rpm/macros.perl |
ef5fe709 | 11 | %define pdir CUPS |
70ba6cfc | 12 | |
fb3b4f59 ER |
13 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa |
14 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão | |
346112e3 | 15 | Name: cups |
afacd72e | 16 | Version: 1.4.0 |
3e423bb4 | 17 | Release: 2 |
e73da052 | 18 | Epoch: 1 |
948a3d9c | 19 | License: LGPL v2 (libraries), GPL v2 (the rest) + openssl exception |
0366ccc3 | 20 | Group: Applications/Printing |
3cb197ff | 21 | Source0: http://ftp.easysw.com/pub/cups/%{version}/%{name}-%{version}-source.tar.bz2 |
afacd72e | 22 | # Source0-md5: bc5e777d4320cecdd1a64de8035171a8 |
168e60c2 | 23 | Source1: %{name}.init |
fd7e4ff1 | 24 | Source2: %{name}.pamd |
fd4436b5 | 25 | Source3: %{name}.logrotate |
60e0cb5a | 26 | Source4: %{name}.mailto.conf |
84d9a886 | 27 | Source5: %{name}-lpd.inetd |
25dfe94f | 28 | Patch0: %{name}-config.patch |
25dfe94f | 29 | Patch2: %{name}-options.patch |
73a0798d | 30 | Patch3: %{name}-man_pages_linking.patch |
f75e41c7 | 31 | Patch4: %{name}-nostrip.patch |
efe7daa3 | 32 | Patch5: %{name}-certs_FHS.patch |
33 | Patch6: %{name}-direct_usb.patch | |
388c735f | 34 | Patch7: %{name}-no-polluted-krb5config.patch |
388c735f JR |
35 | Patch9: %{name}-verbose-compilation.patch |
36 | Patch10: %{name}-peercred.patch | |
fb328468 | 37 | URL: http://www.cups.org/ |
daf27ba0 | 38 | BuildRequires: acl-devel |
e73da052 | 39 | BuildRequires: autoconf |
40 | BuildRequires: automake | |
ceddaf82 | 41 | %{?with_dnssd:BuildRequires: avahi-compat-libdns_sd-devel} |
e809c01b | 42 | BuildRequires: dbus-devel |
ceddaf82 | 43 | BuildRequires: glibc-headers |
373aff1e | 44 | %{?with_gnutls:BuildRequires: gnutls-devel} |
84d9a886 JR |
45 | %{?with_java:BuildRequires: jar} |
46 | %{?with_java:BuildRequires: jdk} | |
1770fa4c | 47 | %{?with_java:BuildRequires: jpackage-utils} |
eabd561c | 48 | BuildRequires: heimdal-devel |
aa509eeb | 49 | BuildRequires: libjpeg-devel |
d5391671 | 50 | BuildRequires: libpaper-devel |
30d7d426 | 51 | BuildRequires: libpng-devel |
21ee9950 | 52 | BuildRequires: libstdc++-devel |
30d7d426 | 53 | BuildRequires: libtiff-devel |
d5391671 | 54 | BuildRequires: libusb-devel |
0577552c | 55 | BuildRequires: openldap-devel |
c7103aaa | 56 | BuildRequires: openslp-devel |
373aff1e | 57 | %{!?with_gnutls:BuildRequires: openssl-devel} |
8bdc526e | 58 | BuildRequires: pam-devel |
752c3387 | 59 | %{?with_php:BuildRequires: php-devel >= 4:5.0.0} |
3219126a | 60 | BuildRequires: pkgconfig |
1770fa4c | 61 | %{?with_java:BuildRequires: rpm-javaprov} |
559b7094 | 62 | BuildRequires: rpm-perlprov |
4fc96bcd | 63 | BuildRequires: rpmbuild(macros) >= 1.344 |
9e9d05b7 | 64 | Requires(post,preun): /sbin/chkconfig |
39956f63 | 65 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
7d1a8fed | 66 | Requires: openssl-tools |
6bd9c7f7 | 67 | Requires: pam >= 0.77.3 |
a73a2669 | 68 | Requires: rc-scripts |
09af927c | 69 | Provides: printingdaemon |
1770fa4c | 70 | Obsoletes: printingdaemon |
a73a2669 | 71 | Conflicts: ghostscript < 7.05.4 |
9e79f779 | 72 | Conflicts: logrotate < 3.7-4 |
d7ee1497 PG |
73 | # pstoraster: |
74 | Suggests: cups-filter-pstoraster | |
75 | # Contains imagetops...: | |
bfcdd2d6 | 76 | Suggests: kde4-kde3support |
d7ee1497 PG |
77 | # pdftops: |
78 | Suggests: poppler-progs | |
79 | # pstops: | |
80 | Suggests: psutils | |
91331aef | 81 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
346112e3 | 82 | |
82f3f074 JK |
83 | %define _ulibdir %{_prefix}/lib |
84 | ||
fb328468 | 85 | %description |
dd843423 | 86 | CUPS provides a portable printing layer for UNIX-based operating |
8bff8fce MP |
87 | systems. It has been developed by Easy Software Products to promote a |
88 | standard printing solution for all UNIX vendors and users. CUPS | |
89 | provides the System V and Berkeley command-line interfaces. CUPS uses | |
90 | the Internet Printing Protocol ("IPP") as the basis for managing print | |
91 | jobs and queues. The Line Printer Daemon ("LPD") Server Message Block | |
92 | ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are also supported | |
93 | with reduced functionality. CUPS adds network printer browsing and | |
94 | PostScript Printer Description ("PPD") based printing options to | |
95 | support real-world printing under UNIX. | |
346112e3 | 96 | |
2f78071d JR |
97 | %description -l pl.UTF-8 |
98 | CUPS dostarcza standardowy poziom drukowania dla systemów uniksowych. | |
99 | CUPS używa protokołu IPP - Internet Printint Protocol jako podstawy do | |
100 | zarządzania zadaniami i kolejkami druku. W ograniczonym zakresie | |
101 | obsługiwane są także protokoły LPD (Line Printer Daemon), SMB (Server | |
102 | Message Block) i AppSocket (znany także jako JetDirect). CUPS | |
103 | udostępnia przeglądanie drukarek sieciowych i opcje drukowania oparte | |
104 | na PPD (PostScript Printer Description) do obsługi rzeczywistych | |
bc9f5ffe | 105 | drukarek. |
30d7d426 | 106 | |
2f78071d JR |
107 | %description -l pt_BR.UTF-8 |
108 | O sistema Unix de impressão (CUPS) fornece uma camada de impressão | |
109 | portável para os sistemas operacionais baseados no UNIX®. | |
4644dd52 | 110 | |
6ebf74dd | 111 | %package lib |
fd7e4ff1 | 112 | Summary: Common Unix Printing System Libraries |
fb3b4f59 ER |
113 | Summary(pl.UTF-8): Biblioteki dla CUPS |
114 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - bibliotecas para uso em clientes cups | |
948a3d9c | 115 | License: LGPL v2 + openssl exception |
52835768 | 116 | Group: Libraries |
6ebf74dd | 117 | Provides: %{name}-libs = %{epoch}:%{version}-%{release} |
a73a2669 | 118 | Obsoletes: cups-libs |
bf6c7747 | 119 | Obsoletes: libcups1 |
fd7e4ff1 | 120 | |
6ebf74dd | 121 | %description lib |
9625f17f JB |
122 | Common Unix Printing System Libraries. |
123 | ||
2f78071d | 124 | %description lib -l pl.UTF-8 |
9625f17f | 125 | Biblioteki dla CUPS. |
fd7e4ff1 | 126 | |
2f78071d | 127 | %description lib -l pt_BR.UTF-8 |
6ebf74dd AF |
128 | Bibliotecas CUPS requeridas pelos clientes CUPS. |
129 | ||
2da56f05 SZ |
130 | %package clients |
131 | Summary: Common Unix Printing System Clients | |
fb3b4f59 | 132 | Summary(pl.UTF-8): Aplikacje klienckie dla CUPS |
948a3d9c | 133 | License: GPL v2 + openssl exception |
2da56f05 | 134 | Group: Applications/Printing |
e055e440 | 135 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
09af927c | 136 | Provides: printingclient |
1770fa4c | 137 | Obsoletes: printingclient |
2da56f05 SZ |
138 | |
139 | %description clients | |
140 | Common Unix Printing System Clients. | |
141 | ||
2f78071d | 142 | %description clients -l pl.UTF-8 |
2da56f05 SZ |
143 | Aplikacje klienckie dla CUPS. |
144 | ||
6ebf74dd AF |
145 | %package image-lib |
146 | Summary: Common Unix Printing System Libraries - images manipulation | |
fb3b4f59 ER |
147 | Summary(pl.UTF-8): Biblioteki dla CUPS - obsługa formatów graficznych |
148 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - bibliotecas para uso em clientes cups | |
948a3d9c | 149 | License: LGPL v2 + openssl exception |
52835768 | 150 | Group: Libraries |
039c735c | 151 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} |
6ebf74dd AF |
152 | Obsoletes: libcups1 |
153 | ||
154 | %description image-lib | |
257636d7 | 155 | Common Unix Printing System Libraries - images manipalation. |
6ebf74dd | 156 | |
2f78071d JR |
157 | %description image-lib -l pl.UTF-8 |
158 | Biblioteki dla CUPS - obsługa formatów graficznych. | |
6ebf74dd | 159 | |
2f78071d | 160 | %description image-lib -l pt_BR.UTF-8 |
4644dd52 | 161 | Bibliotecas CUPS requeridas pelos clientes CUPS. |
162 | ||
980a97fe | 163 | %package devel |
164 | Summary: Common Unix Printing System development files | |
fb3b4f59 ER |
165 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa - pliki nagłówkowe |
166 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - ambiente de desenvolvimento | |
948a3d9c | 167 | License: LGPL v2 + openssl exception |
980a97fe | 168 | Group: Development/Libraries |
cd99fdf9 JB |
169 | Requires: %{name}-image-lib = %{epoch}:%{version}-%{release} |
170 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} | |
3e2caa76 | 171 | # for libcups |
950cc25f | 172 | %{?with_gnutls:Requires: gnutls-devel} |
eabd561c | 173 | Requires: heimdal-devel |
950cc25f | 174 | %{!?with_gnutls:Requires: openssl-devel} |
717a8d25 | 175 | Requires: zlib-devel |
3e2caa76 JB |
176 | # for libcupsimage |
177 | Requires: libjpeg-devel | |
178 | Requires: libpng-devel | |
179 | Requires: libtiff-devel | |
bf6c7747 | 180 | Obsoletes: libcups1-devel |
980a97fe | 181 | |
182 | %description devel | |
9625f17f | 183 | Common Unix Printing System development files. |
980a97fe | 184 | |
2f78071d JR |
185 | %description devel -l pl.UTF-8 |
186 | Ogólny system druku dla Uniksa - pliki nagłówkowe. | |
8bdc526e | 187 | |
2f78071d JR |
188 | %description devel -l pt_BR.UTF-8 |
189 | Este pacote é um adicional que contem um ambiente de desenvolvimento | |
190 | para a criação de suporte a novas impressoras e novos serviços ao | |
4644dd52 | 191 | CUPS. |
192 | ||
980a97fe | 193 | %package static |
194 | Summary: Common Unix Printing System static libraries | |
fb3b4f59 ER |
195 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa - biblioteki statyczne |
196 | Summary(pt_BR.UTF-8): Common Unix Printing System - bibliotecas estáticas | |
948a3d9c | 197 | License: LGPL v2 + openssl exception |
980a97fe | 198 | Group: Development/Libraries |
cd99fdf9 | 199 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
980a97fe | 200 | |
201 | %description static | |
8bdc526e | 202 | Common Unix Printing System static libraries. |
980a97fe | 203 | |
2f78071d JR |
204 | %description static -l pl.UTF-8 |
205 | Ogólny system druku dla Uniksa - biblioteki statyczne. | |
8bdc526e | 206 | |
2f78071d JR |
207 | %description static -l pt_BR.UTF-8 |
208 | Bibliotecas estáticas para desenvolvimento de programas que usam as | |
4644dd52 | 209 | bibliotecas do CUPS. |
210 | ||
2e2308c6 | 211 | %package -n perl-cups |
7be5c8e8 | 212 | Summary: Perl module for CUPS |
fb3b4f59 | 213 | Summary(pl.UTF-8): Moduł Perla CUPS |
948a3d9c | 214 | License: GPL v2 + openssl exception |
7be5c8e8 | 215 | Group: Development/Languages/Perl |
cd99fdf9 | 216 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} |
2e2308c6 AF |
217 | |
218 | %description -n perl-cups | |
7be5c8e8 JB |
219 | Perl module for Common Unix Printing System. |
220 | ||
2f78071d JR |
221 | %description -n perl-cups -l pl.UTF-8 |
222 | Moduł Perla do ogólnego systemu druku dla Uniksa. | |
2e2308c6 AF |
223 | |
224 | %package -n php-cups | |
225 | Summary: PHP module for CUPS | |
fb3b4f59 | 226 | Summary(pl.UTF-8): Moduł PHP CUPS |
948a3d9c | 227 | License: GPL v2 + openssl exception |
7be5c8e8 | 228 | Group: Development/Languages/PHP |
cd99fdf9 | 229 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} |
ed486845 | 230 | %{?requires_php_extension} |
786665a9 | 231 | Requires: /etc/php/conf.d |
752c3387 | 232 | Requires: php-common >= 4:5.0.0 |
2e2308c6 AF |
233 | |
234 | %description -n php-cups | |
235 | PHP module for Common Unix Printing System. | |
236 | ||
2f78071d JR |
237 | %description -n php-cups -l pl.UTF-8 |
238 | Moduł PHP do ogólnego systemu druku dla Uniksa. | |
7be5c8e8 | 239 | |
84d9a886 JR |
240 | %package -n java-cups |
241 | Summary: CUPS java classes | |
242 | Summary(pl.UTF-8): Klasy javy CUPS | |
948a3d9c | 243 | License: GPL v2 + openssl exception |
35e2cf44 | 244 | Group: Libraries/Java |
1770fa4c | 245 | Requires: jpackage-utils |
84d9a886 JR |
246 | |
247 | %description -n java-cups | |
248 | Common Unix Printing System Java classes. | |
249 | ||
250 | %description -n java-cups -l pl.UTF-8 | |
251 | Klasy javy do ogólnego systemu druku dla Uniksa. | |
252 | ||
1770fa4c ER |
253 | %package -n java-cups-javadoc |
254 | Summary: Online manual for %{name} | |
255 | Summary(pl.UTF-8): Dokumentacja online do %{name} | |
948a3d9c | 256 | License: GPL v2 + openssl exception |
1770fa4c ER |
257 | Group: Documentation |
258 | Requires: jpackage-utils | |
259 | ||
260 | %description -n java-cups-javadoc | |
261 | Documentation for %{name}. | |
262 | ||
263 | %description -n java-cups-javadoc -l pl.UTF-8 | |
264 | Dokumentacja do %{name}. | |
265 | ||
266 | %description -n java-cups-javadoc -l fr.UTF-8 | |
267 | Javadoc pour %{name}. | |
268 | ||
25aeafb8 | 269 | %package backend-usb |
0f8ac12d | 270 | Summary: USB backend for CUPS |
fb3b4f59 | 271 | Summary(pl.UTF-8): Backend USB dla CUPS-a |
948a3d9c | 272 | License: GPL v2 + openssl exception |
0f8ac12d | 273 | Group: Applications/Printing |
cd99fdf9 | 274 | Requires: %{name} = %{epoch}:%{version}-%{release} |
0f8ac12d AF |
275 | |
276 | %description backend-usb | |
277 | This package allow CUPS printing on USB printers. | |
278 | ||
2f78071d JR |
279 | %description backend-usb -l pl.UTF-8 |
280 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach USB. | |
71ac0ea6 | 281 | |
25aeafb8 | 282 | %package backend-serial |
71ac0ea6 | 283 | Summary: Serial port backend for CUPS |
fb3b4f59 | 284 | Summary(pl.UTF-8): Backend obsługujący porty szeregowe dla CUPS-a |
948a3d9c | 285 | License: GPL v2 + openssl exception |
0f8ac12d | 286 | Group: Applications/Printing |
cd99fdf9 | 287 | Requires: %{name} = %{epoch}:%{version}-%{release} |
0f8ac12d AF |
288 | |
289 | %description backend-serial | |
71ac0ea6 JB |
290 | This package allow CUPS printing on printers connected by serial |
291 | ports. | |
292 | ||
2f78071d JR |
293 | %description backend-serial -l pl.UTF-8 |
294 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach | |
295 | podłączonych do portów szeregowych. | |
0f8ac12d | 296 | |
25aeafb8 | 297 | %package backend-parallel |
71ac0ea6 | 298 | Summary: Parallel port backend for CUPS |
fb3b4f59 | 299 | Summary(pl.UTF-8): Backend obsługujący porty równoległe dla CUPS-a |
948a3d9c | 300 | License: GPL v2 + openssl exception |
0f8ac12d | 301 | Group: Applications/Printing |
cd99fdf9 | 302 | Requires: %{name} = %{epoch}:%{version}-%{release} |
0f8ac12d AF |
303 | |
304 | %description backend-parallel | |
71ac0ea6 JB |
305 | This package allow CUPS printing on printers connected by parallel |
306 | ports. | |
307 | ||
2f78071d JR |
308 | %description backend-parallel -l pl.UTF-8 |
309 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach | |
310 | podłączonych do portów równoległych. | |
0f8ac12d | 311 | |
84d9a886 JR |
312 | %package lpd |
313 | Summary: LPD compatibility support for CUPS print server | |
314 | Summary(pl.UTF-8): Wsparcie dla LPD w serwerze wydruków CUPS | |
948a3d9c | 315 | License: GPL v2 + openssl exception |
84d9a886 | 316 | Group: Applications/Printing |
84d9a886 | 317 | Requires: %{name} = %{epoch}:%{version}-%{release} |
1770fa4c | 318 | Requires: rc-inetd |
84d9a886 JR |
319 | |
320 | %description lpd | |
321 | LPD compatibility support for CUPS print server. | |
322 | ||
323 | %description lpd -l pl.UTF-8 | |
324 | Wsparcie dla LPD w serwerze wydruków CUPS. | |
325 | ||
346112e3 | 326 | %prep |
735a5048 | 327 | %setup -q |
73a0798d | 328 | %patch0 -p1 |
25dfe94f | 329 | %patch2 -p1 |
73a0798d | 330 | %patch3 -p1 |
f75e41c7 | 331 | %patch4 -p1 |
653cdc22 | 332 | %patch5 -p1 |
428f33ff | 333 | %patch6 -p1 |
388c735f | 334 | %patch7 -p1 |
84d9a886 | 335 | %patch9 -p1 |
948a3d9c | 336 | %patch10 -p1 |
8bdc526e | 337 | |
346112e3 | 338 | %build |
daf27ba0 | 339 | %{__aclocal} -I config-scripts |
0b9d4622 | 340 | %{__autoconf} |
c6f4ebff | 341 | %configure \ |
82f3f074 | 342 | --libdir=%{_ulibdir} \ |
5aac26ac | 343 | --disable-cdsassl \ |
d5391671 AM |
344 | --enable-libpaper \ |
345 | --enable-libusb \ | |
346 | --enable-acl \ | |
5aac26ac | 347 | --enable-dbus \ |
d5391671 AM |
348 | --enable-image \ |
349 | --enable-bannertops \ | |
350 | --enable-texttops \ | |
8d2025a2 | 351 | --enable-shared \ |
5aac26ac KK |
352 | --enable-ssl \ |
353 | %{?debug:--enable-debug} \ | |
354 | --%{!?with_dnssd:dis}%{?with_dnssd:en}able-dnssd \ | |
355 | --%{!?with_gnutls:dis}%{?with_gnutls:en}able-gnutls \ | |
356 | --%{?with_gnutls:dis}%{!?with_gnutls:en}able-openssl \ | |
357 | %{?with_static_libs:--enable-static} \ | |
ceddaf82 | 358 | --with-cups-user=lp \ |
32eff1a9 | 359 | --with-cups-group=lp \ |
ceddaf82 AM |
360 | --with-system-groups=sys \ |
361 | --with-printcap=/etc/printcap \ | |
5aac26ac | 362 | --with-dbusdir=/etc/dbus-1 \ |
373aff1e | 363 | --with-docdir=%{_ulibdir}/%{name}/cgi-bin \ |
ceddaf82 AM |
364 | --with-config-file-perm=0640 \ |
365 | --with-log-file-perm=0640 \ | |
5aac26ac | 366 | --with-optim=-Wno-format-y2k \ |
ceddaf82 AM |
367 | %{?with_dnssd:--with-dnssd-libs=x} \ |
368 | %{?with_dnssd:--with-dnssd-includes=x} \ | |
afacd72e | 369 | --with-java=%{_bindir}/java \ |
3e423bb4 AM |
370 | %{?with_perl:--with-perl=%{_bindir}/perl} \ |
371 | %{?with_php:--with-php=%{_bindir}/php} \ | |
372 | %{?with_python:--with-python=%{_bindir}/python} | |
373aff1e | 373 | |
346112e3 | 374 | %{__make} |
7be5c8e8 | 375 | |
cad7b106 | 376 | %{__perl} -pi -e 's#-I\.\.\/\.\.#-I../.. -I../../cups#g' scripting/php/Makefile |
e809c01b | 377 | %{?with_php:%{__make} -C scripting/php PHPCONFIG=%{_bindir}/php-config} |
7be5c8e8 | 378 | |
f07e6182 | 379 | %if %{with perl} |
2e2308c6 | 380 | cd scripting/perl |
7be5c8e8 JB |
381 | %{__perl} -pi -e 's@-lcups@-L../../cups $1@' Makefile.PL |
382 | %{__perl} Makefile.PL \ | |
383 | INSTALLDIRS=vendor \ | |
384 | OPTIMIZE="%{rpmcflags} -I../.." | |
385 | # avoid rpaths generated by MakeMaker | |
cad7b106 | 386 | %{__perl} -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' Makefile |
7be5c8e8 JB |
387 | |
388 | %{__make} | |
2e2308c6 AF |
389 | cd ../.. |
390 | %endif | |
346112e3 | 391 | |
392 | %install | |
393 | rm -rf $RPM_BUILD_ROOT | |
84d9a886 | 394 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,logrotate.d,security,sysconfig/rc-inetd} \ |
428f33ff | 395 | $RPM_BUILD_ROOT/var/run/cups \ |
38f5ddf3 | 396 | $RPM_BUILD_ROOT/var/log/{,archive/}cups |
fd7e4ff1 | 397 | |
6133c494 | 398 | %{__make} install \ |
e827011a AM |
399 | BUILDROOT=$RPM_BUILD_ROOT \ |
400 | CUPS_USER=$(id -u) \ | |
401 | CUPS_GROUP=$(id -g) | |
fd7e4ff1 | 402 | |
82f3f074 JK |
403 | if [ "%{_lib}" != "lib" ] ; then |
404 | install -d $RPM_BUILD_ROOT%{_libdir} | |
405 | mv $RPM_BUILD_ROOT%{_ulibdir}/*.so* $RPM_BUILD_ROOT%{_libdir} | |
8a37ac1d | 406 | %if %{with static_libs} |
e3bfc8b9 | 407 | mv $RPM_BUILD_ROOT%{_ulibdir}/*.a $RPM_BUILD_ROOT%{_libdir} |
8a37ac1d | 408 | %endif |
82f3f074 JK |
409 | fi |
410 | ||
f07e6182 | 411 | %if %{with php} |
2e2308c6 | 412 | %{__make} -C scripting/php install \ |
4fc96bcd ER |
413 | PHPDIR=$RPM_BUILD_ROOT%{php_extensiondir} |
414 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d | |
1770fa4c | 415 | cat > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/phpcups.ini << 'EOF' |
e809c01b | 416 | ; Enable phpcups extension module |
752c3387 ER |
417 | extension=phpcups.so |
418 | EOF | |
2e2308c6 AF |
419 | %endif |
420 | ||
f07e6182 | 421 | %if %{with perl} |
653cdc22 | 422 | %{__make} -C scripting/perl install \ |
6133c494 | 423 | DESTDIR=$RPM_BUILD_ROOT |
2e2308c6 AF |
424 | %endif |
425 | ||
cad7b106 | 426 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
427 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/%{name} | |
428 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
1770fa4c | 429 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/cups/mailto.conf |
84d9a886 | 430 | sed -e 's|__ULIBDIR__|%{_ulibdir}|g' %{SOURCE5} > $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/cups-lpd |
45a67ab9 | 431 | |
4d897458 | 432 | touch $RPM_BUILD_ROOT/var/log/cups/{access_log,error_log,page_log} |
cad7b106 | 433 | touch $RPM_BUILD_ROOT/etc/security/blacklist.cups |
8d2025a2 | 434 | touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{classes,printers,client}.conf |
679be76f | 435 | |
ef5fe709 ER |
436 | # windows drivers can be put there. |
437 | install -d $RPM_BUILD_ROOT%{_datadir}/cups/drivers | |
438 | ||
748a0bf9 ER |
439 | # dirs for gimp-print-cups-4.2.7-1 |
440 | install -d $RPM_BUILD_ROOT%{_datadir}/cups/model/{C,da,en_GB,fr,nb,pl,sv} | |
441 | ||
daf27ba0 | 442 | touch $RPM_BUILD_ROOT/var/cache/cups/help.index |
6139e54a | 443 | touch $RPM_BUILD_ROOT/var/cache/cups/{job,remote}.cache |
68e5a032 | 444 | touch $RPM_BUILD_ROOT/var/cache/cups/ppds.dat |
748a0bf9 | 445 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/cups/ssl |
ef5fe709 | 446 | |
eea94f34 | 447 | # links to enable/disable (compatibility!) |
748a0bf9 ER |
448 | ln -s accept $RPM_BUILD_ROOT%{_sbindir}/enable |
449 | ln -s accept $RPM_BUILD_ROOT%{_sbindir}/disable | |
eea94f34 | 450 | |
4e75f969 JB |
451 | # fix/update locale names |
452 | install -d $RPM_BUILD_ROOT%{_datadir}/locale/{nb,zh_CN} | |
453 | mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{no/cups_no.po,nb/cups_nb.po} | |
454 | mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{zh/cups_zh.po,zh_CN/cups_zh_CN.po} | |
455 | ||
2e2308c6 | 456 | # check-files cleanup |
0ce3cd57 | 457 | rm -rf $RPM_BUILD_ROOT%{_mandir}/{,es/,fr/}cat? |
748a0bf9 | 458 | rm -rf $RPM_BUILD_ROOT/''etc/{init.d,rc?.d}/* |
54906e64 | 459 | rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cupsd.conf.default |
679be76f | 460 | |
9625f17f JB |
461 | %clean |
462 | rm -rf $RPM_BUILD_ROOT | |
463 | ||
168e60c2 | 464 | %post |
8a24ec7f | 465 | /sbin/chkconfig --add cups |
a73a2669 | 466 | %service cups restart "cups daemon" |
fb328468 | 467 | |
168e60c2 | 468 | %preun |
fd7e4ff1 | 469 | if [ "$1" = "0" ]; then |
a73a2669 | 470 | %service cups stop |
fd7e4ff1 | 471 | /sbin/chkconfig --del cups |
472 | fi | |
168e60c2 | 473 | |
19e8d1ed | 474 | %post lib -p /sbin/ldconfig |
475 | %postun lib -p /sbin/ldconfig | |
476 | %post image-lib -p /sbin/ldconfig | |
477 | %postun image-lib -p /sbin/ldconfig | |
8bdc526e | 478 | |
752c3387 | 479 | %post -n php-cups |
572f9a81 | 480 | %php_webserver_restart |
752c3387 ER |
481 | |
482 | %postun -n php-cups | |
483 | if [ "$1" = 0 ]; then | |
572f9a81 | 484 | %php_webserver_restart |
752c3387 ER |
485 | fi |
486 | ||
84d9a886 JR |
487 | %post lpd |
488 | %service -q rc-inetd reload | |
489 | ||
490 | %postun lpd | |
491 | if [ "$1" = 0 ]; then | |
492 | %service -q rc-inetd reload | |
493 | fi | |
494 | ||
fd7e4ff1 | 495 | %files |
346112e3 | 496 | %defattr(644,root,root,755) |
4c209b1f | 497 | %doc *.txt |
39956f63 | 498 | %attr(640,root,root) %config %verify(not md5 mtime size) /etc/pam.d/* |
8bdc526e | 499 | %attr(754,root,root) /etc/rc.d/init.d/cups |
e809c01b | 500 | /etc/dbus-1/system.d/cups.conf |
6139e54a | 501 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/classes.conf |
39956f63 | 502 | %attr(640,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/cupsd.conf |
daf27ba0 | 503 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/printers.conf |
60e0cb5a | 504 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mailto.conf |
3cb197ff | 505 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/snmp.conf |
cd29fb20 | 506 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.cups |
4017839a | 507 | %dir %attr(700,root,lp) %{_sysconfdir}/%{name}/ssl |
934a05d8 | 508 | %dir %{_sysconfdir}/%{name}/interfaces |
6139e54a | 509 | %dir %attr(755,root,lp) %{_sysconfdir}/%{name}/ppd |
39956f63 | 510 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} |
fd7e4ff1 | 511 | %attr(4755,lp,root) %{_bindir}/lppasswd |
3ddab923 | 512 | %attr(755,root,root) %{_bindir}/cupstestppd |
e809c01b | 513 | %attr(755,root,root) %{_bindir}/cupstestdsc |
25802dee | 514 | %attr(755,root,root) %{_bindir}/ppd* |
ceddaf82 | 515 | %attr(755,root,root) %{_sbindir}/cupsctl |
daf27ba0 | 516 | %attr(755,root,root) %{_sbindir}/cupsd |
ceddaf82 | 517 | %attr(755,root,root) %{_sbindir}/cupsfilter |
daf27ba0 | 518 | |
82f3f074 JK |
519 | %dir %{_ulibdir}/cups |
520 | %dir %{_ulibdir}/cups/* | |
daf27ba0 KK |
521 | %{_ulibdir}/cups/cgi-bin/help |
522 | %{_ulibdir}/cups/cgi-bin/images | |
523 | %attr(755,root,root) %{_ulibdir}/cups/cgi-bin/*.cgi | |
524 | %{_ulibdir}/cups/cgi-bin/*.css | |
525 | %{_ulibdir}/cups/cgi-bin/*.html | |
daf27ba0 | 526 | %{_ulibdir}/cups/cgi-bin/*.txt |
21212dc8 | 527 | %lang(de) %{_ulibdir}/cups/cgi-bin/de |
daf27ba0 | 528 | %lang(es) %{_ulibdir}/cups/cgi-bin/es |
afacd72e | 529 | %lang(eu) %{_ulibdir}/cups/cgi-bin/eu |
daf27ba0 KK |
530 | %lang(ja) %{_ulibdir}/cups/cgi-bin/ja |
531 | %lang(pl) %{_ulibdir}/cups/cgi-bin/pl | |
afacd72e | 532 | %lang(ru) %{_ulibdir}/cups/cgi-bin/ru |
daf27ba0 | 533 | |
82f3f074 JK |
534 | %exclude %{_ulibdir}/cups/backend/usb |
535 | %exclude %{_ulibdir}/cups/backend/serial | |
536 | %exclude %{_ulibdir}/cups/backend/parallel | |
daf27ba0 | 537 | %attr(755,root,root) %{_ulibdir}/cups/backend/* |
84d9a886 JR |
538 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-deviced |
539 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-driverd | |
540 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-polld | |
daf27ba0 KK |
541 | %attr(755,root,root) %{_ulibdir}/cups/filter/* |
542 | %attr(755,root,root) %{_ulibdir}/cups/monitor/* | |
543 | %attr(755,root,root) %{_ulibdir}/cups/notifier/* | |
544 | ||
54906e64 | 545 | %{_datadir}/cups/banners |
54906e64 ER |
546 | %{_datadir}/cups/charsets |
547 | %{_datadir}/cups/data | |
6139e54a | 548 | %{_datadir}/cups/drivers |
25802dee AM |
549 | %{_datadir}/cups/drv |
550 | %{_datadir}/cups/examples | |
54906e64 | 551 | %{_datadir}/cups/fonts |
25802dee | 552 | %{_datadir}/cups/mime |
748a0bf9 | 553 | %dir %{_datadir}/cups/model |
748a0bf9 ER |
554 | # dirs for gimp-print-cups-4.2.7-1 |
555 | %dir %{_datadir}/cups/model/C | |
556 | %lang(da) %dir %{_datadir}/cups/model/da | |
557 | %lang(en_GB) %dir %{_datadir}/cups/model/en_GB | |
558 | %lang(fr) %dir %{_datadir}/cups/model/fr | |
559 | %lang(nb) %dir %{_datadir}/cups/model/nb | |
560 | %lang(pl) %dir %{_datadir}/cups/model/pl | |
561 | %lang(sv) %dir %{_datadir}/cups/model/sv | |
562 | ||
25802dee AM |
563 | %{_datadir}/cups/ppdc |
564 | ||
54906e64 ER |
565 | %dir %{_datadir}/cups/templates |
566 | %{_datadir}/cups/templates/*.tmpl | |
21212dc8 | 567 | %lang(de) %{_datadir}/cups/templates/de |
54906e64 | 568 | %lang(es) %{_datadir}/cups/templates/es |
afacd72e | 569 | %lang(eu) %{_datadir}/cups/templates/eu |
54906e64 ER |
570 | %lang(ja) %{_datadir}/cups/templates/ja |
571 | %lang(pl) %{_datadir}/cups/templates/pl | |
afacd72e | 572 | %lang(ru) %{_datadir}/cups/templates/ru |
c1555e94 | 573 | %{_mandir}/man1/cupstestppd.1* |
e809c01b | 574 | %{_mandir}/man1/cupstestdsc.1* |
0366ccc3 | 575 | %{_mandir}/man1/lppasswd.1* |
25802dee | 576 | %{_mandir}/man1/ppd*.1* |
4e75f969 | 577 | %{_mandir}/man7/backend.7* |
25802dee | 578 | %{_mandir}/man7/drv.7* |
4e75f969 | 579 | %{_mandir}/man7/filter.7* |
25802dee | 580 | %{_mandir}/man7/notifier.7* |
84d9a886 JR |
581 | %{_mandir}/man5/* |
582 | %{_mandir}/man8/accept.8* | |
583 | %{_mandir}/man8/cups-deviced.8* | |
584 | %{_mandir}/man8/cups-driverd.8* | |
585 | %{_mandir}/man8/cups-polld.8* | |
586 | %{_mandir}/man8/cupsaddsmb.8* | |
587 | %{_mandir}/man8/cupsctl.8* | |
588 | %{_mandir}/man8/cupsd.8* | |
589 | %{_mandir}/man8/cupsenable.8* | |
590 | %{_mandir}/man8/cupsfilter.8* | |
591 | %{_mandir}/man8/lp* | |
daf27ba0 KK |
592 | |
593 | %dir %attr(775,root,lp) /var/cache/cups | |
428f33ff KK |
594 | %dir %attr(755,root,lp) /var/lib/cups |
595 | %dir %attr(511,lp,sys) /var/lib/cups/certs | |
6139e54a | 596 | %dir %attr(755,root,lp) /var/run/cups |
daf27ba0 KK |
597 | %dir %attr(710,root,lp) /var/spool/cups |
598 | %dir %attr(1770,root,lp) /var/spool/cups/tmp | |
68e5a032 | 599 | %attr(600,lp,lp) %ghost /var/cache/cups/help.index |
6139e54a | 600 | %attr(640,root,lp) %ghost /var/cache/cups/job.cache |
68e5a032 | 601 | %attr(600,lp,lp) %ghost /var/cache/cups/ppds.dat |
6139e54a | 602 | %attr(640,root,lp) %ghost /var/cache/cups/remote.cache |
081a50cb | 603 | %attr(750,root,logs) %dir /var/log/archive/cups |
40183055 JK |
604 | %attr(750,root,logs) %dir /var/log/cups |
605 | %attr(640,root,logs) %ghost /var/log/cups/access_log | |
606 | %attr(640,root,logs) %ghost /var/log/cups/error_log | |
607 | %attr(640,root,logs) %ghost /var/log/cups/page_log | |
980a97fe | 608 | |
6ebf74dd AF |
609 | %files lib |
610 | %defattr(644,root,root,755) | |
3c247a25 | 611 | %dir %attr(755,root,lp) %{_sysconfdir}/%{name} |
6ebf74dd | 612 | %attr(755,root,root) %{_libdir}/libcups.so.* |
25802dee AM |
613 | %attr(755,root,root) %{_libdir}/libcupscgi.so.* |
614 | %attr(755,root,root) %{_libdir}/libcupsdriver.so.* | |
615 | %attr(755,root,root) %{_libdir}/libcupsmime.so.* | |
616 | %attr(755,root,root) %{_libdir}/libcupsppdc.so.* | |
a57fa410 KK |
617 | %dir %{_datadir}/cups |
618 | %{_datadir}/cups/charmaps | |
619 | %lang(da) %{_datadir}/locale/da/cups_da.po | |
620 | %lang(de) %{_datadir}/locale/de/cups_de.po | |
621 | %lang(es) %{_datadir}/locale/es/cups_es.po | |
afacd72e | 622 | %lang(eu) %{_datadir}/locale/eu/cups_eu.po |
a57fa410 KK |
623 | %lang(fi) %{_datadir}/locale/fi/cups_fi.po |
624 | %lang(fr) %{_datadir}/locale/fr/cups_fr.po | |
a57fa410 KK |
625 | %lang(it) %{_datadir}/locale/it/cups_it.po |
626 | %lang(ko) %{_datadir}/locale/ko/cups_ko.po | |
627 | %lang(ja) %{_datadir}/locale/ja/cups_ja.po | |
628 | %lang(nl) %{_datadir}/locale/nl/cups_nl.po | |
4e75f969 | 629 | %lang(nb) %{_datadir}/locale/nb/cups_nb.po |
a57fa410 KK |
630 | %lang(pl) %{_datadir}/locale/pl/cups_pl.po |
631 | %lang(pt) %{_datadir}/locale/pt/cups_pt.po | |
632 | %lang(pt_BR) %{_datadir}/locale/pt_BR/cups_pt_BR.po | |
a57fa410 KK |
633 | %lang(ru) %{_datadir}/locale/ru/cups_ru.po |
634 | %lang(sv) %{_datadir}/locale/sv/cups_sv.po | |
4e75f969 | 635 | %lang(zh_CN) %{_datadir}/locale/zh_CN/cups_zh_CN.po |
a57fa410 | 636 | %lang(zh_TW) %{_datadir}/locale/zh_TW/cups_zh_TW.po |
6ebf74dd | 637 | |
2da56f05 SZ |
638 | %files clients |
639 | %defattr(644,root,root,755) | |
8d2025a2 | 640 | %attr(644,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/client.conf |
2da56f05 | 641 | %attr(755,root,root) %{_bindir}/cancel |
2da56f05 SZ |
642 | %attr(755,root,root) %{_bindir}/lp |
643 | %attr(755,root,root) %{_bindir}/lpoptions | |
644 | %attr(755,root,root) %{_bindir}/lpq | |
645 | %attr(755,root,root) %{_bindir}/lpr | |
646 | %attr(755,root,root) %{_bindir}/lprm | |
647 | %attr(755,root,root) %{_bindir}/lpstat | |
501ef07e | 648 | %attr(755,root,root) %{_sbindir}/accept |
25802dee | 649 | %attr(755,root,root) %{_sbindir}/cupsaccept |
501ef07e | 650 | %attr(755,root,root) %{_sbindir}/cupsaddsmb |
eea94f34 | 651 | %attr(755,root,root) %{_sbindir}/cupsenable |
652 | %attr(755,root,root) %{_sbindir}/cupsdisable | |
25802dee | 653 | %attr(755,root,root) %{_sbindir}/cupsreject |
eea94f34 | 654 | %attr(755,root,root) %{_sbindir}/disable |
655 | %attr(755,root,root) %{_sbindir}/enable | |
501ef07e AM |
656 | %attr(755,root,root) %{_sbindir}/lpadmin |
657 | %attr(755,root,root) %{_sbindir}/lpc | |
658 | %attr(755,root,root) %{_sbindir}/lpinfo | |
659 | %attr(755,root,root) %{_sbindir}/lpmove | |
660 | %attr(755,root,root) %{_sbindir}/reject | |
1770fa4c ER |
661 | %{_desktopdir}/cups.desktop |
662 | %{_iconsdir}/hicolor/*/apps/cups.png | |
93040bdf | 663 | %{_mandir}/man1/cancel.1* |
0366ccc3 AF |
664 | %{_mandir}/man1/lp.1* |
665 | %{_mandir}/man1/lpoptions.1* | |
666 | %{_mandir}/man1/lpq.1* | |
667 | %{_mandir}/man1/lpr.1* | |
668 | %{_mandir}/man1/lprm.1* | |
669 | %{_mandir}/man1/lpstat.1* | |
25802dee AM |
670 | %{_mandir}/man8/cupsaccept.8* |
671 | %{_mandir}/man8/cupsdisable.8* | |
672 | %{_mandir}/man8/cupsreject.8* | |
673 | %{_mandir}/man8/reject.8* | |
2da56f05 | 674 | |
6ebf74dd | 675 | %files image-lib |
fd7e4ff1 | 676 | %defattr(644,root,root,755) |
6ebf74dd | 677 | %attr(755,root,root) %{_libdir}/libcupsimage.so.* |
fd7e4ff1 | 678 | |
980a97fe | 679 | %files devel |
680 | %defattr(644,root,root,755) | |
6e2c2519 | 681 | %attr(755,root,root) %{_bindir}/cups-config |
4e75f969 | 682 | %attr(755,root,root) %{_libdir}/libcups.so |
25802dee AM |
683 | %attr(755,root,root) %{_libdir}/libcupscgi.so |
684 | %attr(755,root,root) %{_libdir}/libcupsdriver.so | |
4e75f969 | 685 | %attr(755,root,root) %{_libdir}/libcupsimage.so |
25802dee AM |
686 | %attr(755,root,root) %{_libdir}/libcupsmime.so |
687 | %attr(755,root,root) %{_libdir}/libcupsppdc.so | |
980a97fe | 688 | %{_includedir}/cups |
4e75f969 | 689 | %{_mandir}/man1/cups-config.1* |
980a97fe | 690 | |
373aff1e | 691 | %if %{with static_libs} |
8d2025a2 AM |
692 | %files static |
693 | %defattr(644,root,root,755) | |
4e75f969 | 694 | %{_libdir}/libcups.a |
25802dee AM |
695 | %{_libdir}/libcupscgi.a |
696 | %{_libdir}/libcupsdriver.a | |
4e75f969 | 697 | %{_libdir}/libcupsimage.a |
25802dee AM |
698 | %{_libdir}/libcupsmime.a |
699 | %{_libdir}/libcupsppdc.a | |
373aff1e | 700 | %endif |
2e2308c6 | 701 | |
f07e6182 | 702 | %if %{with perl} |
2e2308c6 AF |
703 | %files -n perl-cups |
704 | %defattr(644,root,root,755) | |
4e75f969 | 705 | %{perl_vendorarch}/CUPS.pm |
2e2308c6 | 706 | %dir %{perl_vendorarch}/auto/CUPS |
4e75f969 | 707 | %{perl_vendorarch}/auto/CUPS/CUPS.bs |
2e2308c6 | 708 | %{perl_vendorarch}/auto/CUPS/autosplit.ix |
4e75f969 JB |
709 | %attr(755,root,root) %{perl_vendorarch}/auto/CUPS/CUPS.so |
710 | %{_mandir}/man3/CUPS.3pm* | |
83bc4a43 | 711 | %endif |
2e2308c6 | 712 | |
f07e6182 | 713 | %if %{with php} |
2e2308c6 AF |
714 | %files -n php-cups |
715 | %defattr(644,root,root,755) | |
44b3e11b | 716 | %doc scripting/php/README |
4e75f969 | 717 | %attr(755,root,root) %{php_extensiondir}/phpcups.so |
4fc96bcd | 718 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/phpcups.ini |
83bc4a43 | 719 | %endif |
0f8ac12d AF |
720 | |
721 | %files backend-usb | |
722 | %defattr(644,root,root,755) | |
82f3f074 | 723 | %attr(755,root,root) %{_ulibdir}/cups/backend/usb |
0f8ac12d AF |
724 | |
725 | %files backend-serial | |
726 | %defattr(644,root,root,755) | |
82f3f074 | 727 | %attr(755,root,root) %{_ulibdir}/cups/backend/serial |
0f8ac12d AF |
728 | |
729 | %files backend-parallel | |
730 | %defattr(644,root,root,755) | |
82f3f074 | 731 | %attr(755,root,root) %{_ulibdir}/cups/backend/parallel |
84d9a886 JR |
732 | |
733 | %files lpd | |
734 | %defattr(644,root,root,755) | |
735 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/* | |
736 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-lpd | |
737 | %{_mandir}/man8/cups-lpd.8* |