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