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