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