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