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