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