]>
Commit | Line | Data |
---|---|---|
3540b403 | 1 | # |
7be5c8e8 | 2 | # Conditional build: |
373aff1e | 3 | %bcond_with gnutls # use GNU TLS for SSL/TLS support (instead of OpenSSL) |
cdbbf080 JR |
4 | %bcond_with dnssd # DNS Service Discovery support (obsoleted by Avahi patch) |
5 | %bcond_without avahi # DNS Service Discovery support via Avahi | |
c52ab2b7 JK |
6 | %bcond_without ldap # do not include LDAP support |
7 | %bcond_without gssapi # do not include GSSAPI support | |
84d9a886 | 8 | %bcond_without python # don't build Python support in web interface |
c52ab2b7 | 9 | %bcond_without slp # do not include SLP support |
373aff1e | 10 | %bcond_without static_libs # don't build static library |
70ba6cfc | 11 | |
d07e62b1 | 12 | %define pdir CUPS |
fb3b4f59 ER |
13 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa |
14 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão | |
346112e3 | 15 | Name: cups |
3e1538e5 | 16 | Version: 1.7.0 |
7616b8ed | 17 | Release: 3 |
e73da052 | 18 | Epoch: 1 |
948a3d9c | 19 | License: LGPL v2 (libraries), GPL v2 (the rest) + openssl exception |
0366ccc3 | 20 | Group: Applications/Printing |
3e1538e5 JR |
21 | Source0: http://www.cups.org/software/%{version}/%{name}-%{version}-source.tar.bz2 |
22 | # Source0-md5: 5ab496a2ce27017fcdb3d7ec4818a75a | |
168e60c2 | 23 | Source1: %{name}.init |
fd7e4ff1 | 24 | Source2: %{name}.pamd |
fd4436b5 | 25 | Source3: %{name}.logrotate |
60e0cb5a | 26 | Source4: %{name}.mailto.conf |
84d9a886 | 27 | Source5: %{name}-lpd.inetd |
19a74fff | 28 | Source6: %{name}-modprobe.conf |
33a3fa2f | 29 | Source7: %{name}.tmpfiles |
f72ae4ea | 30 | # svn diff http://svn.easysw.com/public/cups/tags/release-1.4.3/ http://svn.easysw.com/public/cups/branches/branch-1.4/ > cups-branch.diff |
39a6b5e1 | 31 | # + drop config-scripts/cups-common.m4 change |
25dfe94f | 32 | Patch0: %{name}-config.patch |
25dfe94f | 33 | Patch2: %{name}-options.patch |
73a0798d | 34 | Patch3: %{name}-man_pages_linking.patch |
f75e41c7 | 35 | Patch4: %{name}-nostrip.patch |
efe7daa3 | 36 | Patch5: %{name}-certs_FHS.patch |
37 | Patch6: %{name}-direct_usb.patch | |
388c735f | 38 | Patch7: %{name}-no-polluted-krb5config.patch |
388c735f JR |
39 | Patch9: %{name}-verbose-compilation.patch |
40 | Patch10: %{name}-peercred.patch | |
2cd6a49c | 41 | Patch11: %{name}-usb.patch |
eea183cb | 42 | Patch12: %{name}-desktop.patch |
304fa3b3 | 43 | Patch13: %{name}-systemd-socket.patch |
ba7599c9 | 44 | Patch14: add-ipp-backend-of-cups-1.4.patch |
eac40fe0 KK |
45 | Patch15: reactivate_recommended_driver.patch |
46 | Patch16: read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch | |
5d498f1c | 47 | Patch17: %{name}-use-ipp1.1.patch |
6df0c9a8 | 48 | Patch18: %{name}-final-content-type.patch |
c6a236cf | 49 | Patch19: %{name}-jobhistory.patch |
2abe5e57 | 50 | Patch20: %{name}-stringpool-rdar15382819.patch |
d07e62b1 | 51 | # avahi patches from fedora |
3e1538e5 JR |
52 | Patch100: %{name}-avahi-address.patch |
53 | Patch101: %{name}-avahi-no-threaded.patch | |
fb328468 | 54 | URL: http://www.cups.org/ |
daf27ba0 | 55 | BuildRequires: acl-devel |
a70a3fe3 | 56 | BuildRequires: autoconf >= 2.60 |
e73da052 | 57 | BuildRequires: automake |
d07e62b1 ER |
58 | %{?with_dnssd:BuildRequires: avahi-compat-libdns_sd-devel} |
59 | %{?with_avahi:BuildRequires: avahi-devel} | |
e809c01b | 60 | BuildRequires: dbus-devel |
ceddaf82 | 61 | BuildRequires: glibc-headers |
373aff1e | 62 | %{?with_gnutls:BuildRequires: gnutls-devel} |
cc8431ac | 63 | %{?with_gssapi:BuildRequires: heimdal-devel} |
aa509eeb | 64 | BuildRequires: libjpeg-devel |
d5391671 | 65 | BuildRequires: libpaper-devel |
30d7d426 | 66 | BuildRequires: libpng-devel |
21ee9950 | 67 | BuildRequires: libstdc++-devel |
30d7d426 | 68 | BuildRequires: libtiff-devel |
9158c4a7 | 69 | BuildRequires: libusb-devel >= 1.0 |
c52ab2b7 JK |
70 | %{?with_ldap:BuildRequires: openldap-devel} |
71 | %{?with_slp:BuildRequires: openslp-devel} | |
373aff1e | 72 | %{!?with_gnutls:BuildRequires: openssl-devel} |
8bdc526e | 73 | BuildRequires: pam-devel |
3219126a | 74 | BuildRequires: pkgconfig |
cdbbf080 | 75 | BuildRequires: rpmbuild(macros) >= 1.641 |
b65c711b | 76 | BuildRequires: systemd-devel |
9e9d05b7 | 77 | Requires(post,preun): /sbin/chkconfig |
b7adbbe1 | 78 | Requires(post,preun,postun): systemd-units >= 38 |
39956f63 | 79 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
38b89461 | 80 | Requires: cups-filters |
7d1a8fed | 81 | Requires: openssl-tools |
6bd9c7f7 | 82 | Requires: pam >= 0.77.3 |
a73a2669 | 83 | Requires: rc-scripts |
b7adbbe1 | 84 | Requires: systemd-units >= 38 |
cbfa6c41 | 85 | Suggests: ImageMagick-coder-pdf |
cc8431ac | 86 | Suggests: cups-filter-pstoraster |
60d4721a | 87 | Suggests: poppler-progs |
09af927c | 88 | Provides: printingdaemon |
3e1538e5 JR |
89 | Obsoletes: perl-cups |
90 | Obsoletes: php-cups | |
1770fa4c | 91 | Obsoletes: printingdaemon |
a73a2669 | 92 | Conflicts: ghostscript < 7.05.4 |
96792ec6 | 93 | Conflicts: hplip < 3.13.11 |
9e79f779 | 94 | Conflicts: logrotate < 3.7-4 |
91331aef | 95 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
346112e3 | 96 | |
82f3f074 JK |
97 | %define _ulibdir %{_prefix}/lib |
98 | ||
fb328468 | 99 | %description |
dd843423 | 100 | CUPS provides a portable printing layer for UNIX-based operating |
8bff8fce MP |
101 | systems. It has been developed by Easy Software Products to promote a |
102 | standard printing solution for all UNIX vendors and users. CUPS | |
103 | provides the System V and Berkeley command-line interfaces. CUPS uses | |
104 | the Internet Printing Protocol ("IPP") as the basis for managing print | |
105 | jobs and queues. The Line Printer Daemon ("LPD") Server Message Block | |
106 | ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are also supported | |
107 | with reduced functionality. CUPS adds network printer browsing and | |
108 | PostScript Printer Description ("PPD") based printing options to | |
109 | support real-world printing under UNIX. | |
346112e3 | 110 | |
2f78071d JR |
111 | %description -l pl.UTF-8 |
112 | CUPS dostarcza standardowy poziom drukowania dla systemów uniksowych. | |
113 | CUPS używa protokołu IPP - Internet Printint Protocol jako podstawy do | |
114 | zarządzania zadaniami i kolejkami druku. W ograniczonym zakresie | |
115 | obsługiwane są także protokoły LPD (Line Printer Daemon), SMB (Server | |
116 | Message Block) i AppSocket (znany także jako JetDirect). CUPS | |
117 | udostępnia przeglądanie drukarek sieciowych i opcje drukowania oparte | |
118 | na PPD (PostScript Printer Description) do obsługi rzeczywistych | |
bc9f5ffe | 119 | drukarek. |
30d7d426 | 120 | |
2f78071d JR |
121 | %description -l pt_BR.UTF-8 |
122 | O sistema Unix de impressão (CUPS) fornece uma camada de impressão | |
123 | portável para os sistemas operacionais baseados no UNIX®. | |
4644dd52 | 124 | |
6ebf74dd | 125 | %package lib |
fd7e4ff1 | 126 | Summary: Common Unix Printing System Libraries |
fb3b4f59 ER |
127 | Summary(pl.UTF-8): Biblioteki dla CUPS |
128 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - bibliotecas para uso em clientes cups | |
948a3d9c | 129 | License: LGPL v2 + openssl exception |
52835768 | 130 | Group: Libraries |
6ebf74dd | 131 | Provides: %{name}-libs = %{epoch}:%{version}-%{release} |
a73a2669 | 132 | Obsoletes: cups-libs |
bf6c7747 | 133 | Obsoletes: libcups1 |
fd7e4ff1 | 134 | |
6ebf74dd | 135 | %description lib |
9625f17f JB |
136 | Common Unix Printing System Libraries. |
137 | ||
2f78071d | 138 | %description lib -l pl.UTF-8 |
9625f17f | 139 | Biblioteki dla CUPS. |
fd7e4ff1 | 140 | |
2f78071d | 141 | %description lib -l pt_BR.UTF-8 |
6ebf74dd AF |
142 | Bibliotecas CUPS requeridas pelos clientes CUPS. |
143 | ||
2da56f05 SZ |
144 | %package clients |
145 | Summary: Common Unix Printing System Clients | |
fb3b4f59 | 146 | Summary(pl.UTF-8): Aplikacje klienckie dla CUPS |
948a3d9c | 147 | License: GPL v2 + openssl exception |
2da56f05 | 148 | Group: Applications/Printing |
e055e440 | 149 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
09af927c | 150 | Provides: printingclient |
1770fa4c | 151 | Obsoletes: printingclient |
2da56f05 SZ |
152 | |
153 | %description clients | |
154 | Common Unix Printing System Clients. | |
155 | ||
2f78071d | 156 | %description clients -l pl.UTF-8 |
2da56f05 SZ |
157 | Aplikacje klienckie dla CUPS. |
158 | ||
6ebf74dd AF |
159 | %package image-lib |
160 | Summary: Common Unix Printing System Libraries - images manipulation | |
fb3b4f59 ER |
161 | Summary(pl.UTF-8): Biblioteki dla CUPS - obsługa formatów graficznych |
162 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - bibliotecas para uso em clientes cups | |
948a3d9c | 163 | License: LGPL v2 + openssl exception |
52835768 | 164 | Group: Libraries |
039c735c | 165 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} |
6ebf74dd AF |
166 | Obsoletes: libcups1 |
167 | ||
168 | %description image-lib | |
257636d7 | 169 | Common Unix Printing System Libraries - images manipalation. |
6ebf74dd | 170 | |
2f78071d JR |
171 | %description image-lib -l pl.UTF-8 |
172 | Biblioteki dla CUPS - obsługa formatów graficznych. | |
6ebf74dd | 173 | |
2f78071d | 174 | %description image-lib -l pt_BR.UTF-8 |
4644dd52 | 175 | Bibliotecas CUPS requeridas pelos clientes CUPS. |
176 | ||
980a97fe | 177 | %package devel |
178 | Summary: Common Unix Printing System development files | |
fb3b4f59 ER |
179 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa - pliki nagłówkowe |
180 | Summary(pt_BR.UTF-8): Sistema Unix de Impressão - ambiente de desenvolvimento | |
948a3d9c | 181 | License: LGPL v2 + openssl exception |
980a97fe | 182 | Group: Development/Libraries |
cd99fdf9 JB |
183 | Requires: %{name}-image-lib = %{epoch}:%{version}-%{release} |
184 | Requires: %{name}-lib = %{epoch}:%{version}-%{release} | |
3e2caa76 | 185 | # for libcups |
950cc25f | 186 | %{?with_gnutls:Requires: gnutls-devel} |
4e95951c | 187 | %{?with_gssapi:Requires: heimdal-devel} |
950cc25f | 188 | %{!?with_gnutls:Requires: openssl-devel} |
717a8d25 | 189 | Requires: zlib-devel |
3e2caa76 JB |
190 | # for libcupsimage |
191 | Requires: libjpeg-devel | |
192 | Requires: libpng-devel | |
193 | Requires: libtiff-devel | |
bf6c7747 | 194 | Obsoletes: libcups1-devel |
980a97fe | 195 | |
196 | %description devel | |
9625f17f | 197 | Common Unix Printing System development files. |
980a97fe | 198 | |
2f78071d JR |
199 | %description devel -l pl.UTF-8 |
200 | Ogólny system druku dla Uniksa - pliki nagłówkowe. | |
8bdc526e | 201 | |
2f78071d JR |
202 | %description devel -l pt_BR.UTF-8 |
203 | Este pacote é um adicional que contem um ambiente de desenvolvimento | |
204 | para a criação de suporte a novas impressoras e novos serviços ao | |
4644dd52 | 205 | CUPS. |
206 | ||
980a97fe | 207 | %package static |
208 | Summary: Common Unix Printing System static libraries | |
fb3b4f59 ER |
209 | Summary(pl.UTF-8): Ogólny system druku dla Uniksa - biblioteki statyczne |
210 | Summary(pt_BR.UTF-8): Common Unix Printing System - bibliotecas estáticas | |
948a3d9c | 211 | License: LGPL v2 + openssl exception |
980a97fe | 212 | Group: Development/Libraries |
cd99fdf9 | 213 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
980a97fe | 214 | |
215 | %description static | |
8bdc526e | 216 | Common Unix Printing System static libraries. |
980a97fe | 217 | |
2f78071d JR |
218 | %description static -l pl.UTF-8 |
219 | Ogólny system druku dla Uniksa - biblioteki statyczne. | |
8bdc526e | 220 | |
2f78071d JR |
221 | %description static -l pt_BR.UTF-8 |
222 | Bibliotecas estáticas para desenvolvimento de programas que usam as | |
4644dd52 | 223 | bibliotecas do CUPS. |
224 | ||
25aeafb8 | 225 | %package backend-usb |
0f8ac12d | 226 | Summary: USB backend for CUPS |
fb3b4f59 | 227 | Summary(pl.UTF-8): Backend USB dla CUPS-a |
948a3d9c | 228 | License: GPL v2 + openssl exception |
0f8ac12d | 229 | Group: Applications/Printing |
cd99fdf9 | 230 | Requires: %{name} = %{epoch}:%{version}-%{release} |
0f8ac12d AF |
231 | |
232 | %description backend-usb | |
233 | This package allow CUPS printing on USB printers. | |
234 | ||
2f78071d JR |
235 | %description backend-usb -l pl.UTF-8 |
236 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach USB. | |
71ac0ea6 | 237 | |
84d9a886 JR |
238 | %package lpd |
239 | Summary: LPD compatibility support for CUPS print server | |
240 | Summary(pl.UTF-8): Wsparcie dla LPD w serwerze wydruków CUPS | |
948a3d9c | 241 | License: GPL v2 + openssl exception |
84d9a886 | 242 | Group: Applications/Printing |
84d9a886 | 243 | Requires: %{name} = %{epoch}:%{version}-%{release} |
1770fa4c | 244 | Requires: rc-inetd |
84d9a886 JR |
245 | |
246 | %description lpd | |
247 | LPD compatibility support for CUPS print server. | |
248 | ||
249 | %description lpd -l pl.UTF-8 | |
250 | Wsparcie dla LPD w serwerze wydruków CUPS. | |
251 | ||
346112e3 | 252 | %prep |
735a5048 | 253 | %setup -q |
73a0798d | 254 | %patch0 -p1 |
25dfe94f | 255 | %patch2 -p1 |
73a0798d | 256 | %patch3 -p1 |
f75e41c7 | 257 | %patch4 -p1 |
653cdc22 | 258 | %patch5 -p1 |
d15c7d48 AM |
259 | # why it hasn't been merged for so long (and why no other distro uses it) |
260 | #%patch6 -p1 | |
388c735f | 261 | %patch7 -p1 |
84d9a886 | 262 | %patch9 -p1 |
948a3d9c | 263 | %patch10 -p1 |
d15c7d48 AM |
264 | # why it hasn't been merged for so long (and why no other distro uses it) |
265 | #%patch11 -p1 | |
eea183cb | 266 | %patch12 -p1 |
304fa3b3 | 267 | %patch13 -p1 |
ba7599c9 AM |
268 | %patch14 -p1 |
269 | %patch15 -p1 | |
270 | %patch16 -p1 | |
5d498f1c | 271 | %patch17 -p1 |
6df0c9a8 | 272 | %patch18 -p1 |
c6a236cf | 273 | %patch19 -p1 |
2abe5e57 | 274 | %patch20 -p1 |
8bdc526e | 275 | |
84371ffc | 276 | %if %{with avahi} |
d07e62b1 ER |
277 | %patch100 -p1 |
278 | %patch101 -p1 | |
84371ffc | 279 | %endif |
d07e62b1 | 280 | |
346112e3 | 281 | %build |
daf27ba0 | 282 | %{__aclocal} -I config-scripts |
0b9d4622 | 283 | %{__autoconf} |
c6f4ebff | 284 | %configure \ |
82f3f074 | 285 | --libdir=%{_ulibdir} \ |
5aac26ac | 286 | --disable-cdsassl \ |
d5391671 AM |
287 | --enable-libpaper \ |
288 | --enable-libusb \ | |
289 | --enable-acl \ | |
5aac26ac | 290 | --enable-dbus \ |
d5391671 AM |
291 | --enable-image \ |
292 | --enable-bannertops \ | |
293 | --enable-texttops \ | |
8d2025a2 | 294 | --enable-shared \ |
5aac26ac KK |
295 | --enable-ssl \ |
296 | %{?debug:--enable-debug} \ | |
d07e62b1 | 297 | --%{!?with_avahi:dis}%{?with_avahi:en}able-avahi \ |
5aac26ac | 298 | --%{!?with_dnssd:dis}%{?with_dnssd:en}able-dnssd \ |
c52ab2b7 JK |
299 | --%{!?with_ldap:dis}%{?with_ldap:en}able-ldap \ |
300 | --%{!?with_gssapi:dis}%{?with_gssapi:en}able-gssapi \ | |
5aac26ac KK |
301 | --%{!?with_gnutls:dis}%{?with_gnutls:en}able-gnutls \ |
302 | --%{?with_gnutls:dis}%{!?with_gnutls:en}able-openssl \ | |
c52ab2b7 | 303 | --%{!?with_slp:dis}%{?with_slp:en}able-slp \ |
5aac26ac | 304 | %{?with_static_libs:--enable-static} \ |
ceddaf82 | 305 | --with-cups-user=lp \ |
32eff1a9 | 306 | --with-cups-group=lp \ |
ceddaf82 AM |
307 | --with-system-groups=sys \ |
308 | --with-printcap=/etc/printcap \ | |
5aac26ac | 309 | --with-dbusdir=/etc/dbus-1 \ |
373aff1e | 310 | --with-docdir=%{_ulibdir}/%{name}/cgi-bin \ |
ceddaf82 AM |
311 | --with-config-file-perm=0640 \ |
312 | --with-log-file-perm=0640 \ | |
5aac26ac | 313 | --with-optim=-Wno-format-y2k \ |
ceddaf82 AM |
314 | %{?with_dnssd:--with-dnssd-libs=x} \ |
315 | %{?with_dnssd:--with-dnssd-includes=x} \ | |
b65c711b JR |
316 | %{?with_python:--with-python=%{_bindir}/python} \ |
317 | --with-systemdsystemunitdir=%{systemdunitdir} | |
373aff1e | 318 | |
03dce67c | 319 | %{__make} %{?debug:OPTIONS="-DDEBUG"} |
7be5c8e8 | 320 | |
346112e3 | 321 | %install |
322 | rm -rf $RPM_BUILD_ROOT | |
19a74fff | 323 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,logrotate.d,modprobe.d,security,sysconfig/rc-inetd} \ |
428f33ff | 324 | $RPM_BUILD_ROOT/var/run/cups \ |
33a3fa2f | 325 | $RPM_BUILD_ROOT/var/log/{,archive/}cups \ |
cdbbf080 | 326 | $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}} |
fd7e4ff1 | 327 | |
6133c494 | 328 | %{__make} install \ |
e827011a AM |
329 | BUILDROOT=$RPM_BUILD_ROOT \ |
330 | CUPS_USER=$(id -u) \ | |
331 | CUPS_GROUP=$(id -g) | |
fd7e4ff1 | 332 | |
82f3f074 JK |
333 | if [ "%{_lib}" != "lib" ] ; then |
334 | install -d $RPM_BUILD_ROOT%{_libdir} | |
335 | mv $RPM_BUILD_ROOT%{_ulibdir}/*.so* $RPM_BUILD_ROOT%{_libdir} | |
8a37ac1d | 336 | %if %{with static_libs} |
e3bfc8b9 | 337 | mv $RPM_BUILD_ROOT%{_ulibdir}/*.a $RPM_BUILD_ROOT%{_libdir} |
8a37ac1d | 338 | %endif |
82f3f074 JK |
339 | fi |
340 | ||
bf51f358 JR |
341 | %if %{with avahi} |
342 | ln -s %{_ulibdir}/cups/backend/dnssd $RPM_BUILD_ROOT%{_ulibdir}/cups/backend/mdns | |
343 | %endif | |
344 | ||
33a3fa2f JR |
345 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
346 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/%{name} | |
347 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
1770fa4c | 348 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/cups/mailto.conf |
84d9a886 | 349 | sed -e 's|__ULIBDIR__|%{_ulibdir}|g' %{SOURCE5} > $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/cups-lpd |
33a3fa2f | 350 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/modprobe.d/cups.conf |
cdbbf080 | 351 | install %{SOURCE7} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
45a67ab9 | 352 | |
4d897458 | 353 | touch $RPM_BUILD_ROOT/var/log/cups/{access_log,error_log,page_log} |
cad7b106 | 354 | touch $RPM_BUILD_ROOT/etc/security/blacklist.cups |
8d2025a2 | 355 | touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{classes,printers,client}.conf |
679be76f | 356 | |
ef5fe709 ER |
357 | # windows drivers can be put there. |
358 | install -d $RPM_BUILD_ROOT%{_datadir}/cups/drivers | |
359 | ||
748a0bf9 ER |
360 | # dirs for gimp-print-cups-4.2.7-1 |
361 | install -d $RPM_BUILD_ROOT%{_datadir}/cups/model/{C,da,en_GB,fr,nb,pl,sv} | |
362 | ||
daf27ba0 | 363 | touch $RPM_BUILD_ROOT/var/cache/cups/help.index |
6139e54a | 364 | touch $RPM_BUILD_ROOT/var/cache/cups/{job,remote}.cache |
68e5a032 | 365 | touch $RPM_BUILD_ROOT/var/cache/cups/ppds.dat |
748a0bf9 | 366 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/cups/ssl |
ef5fe709 | 367 | |
eea94f34 | 368 | # links to enable/disable (compatibility!) |
748a0bf9 ER |
369 | ln -s accept $RPM_BUILD_ROOT%{_sbindir}/enable |
370 | ln -s accept $RPM_BUILD_ROOT%{_sbindir}/disable | |
eea94f34 | 371 | |
2e2308c6 | 372 | # check-files cleanup |
3e1538e5 | 373 | %{__rm} -r $RPM_BUILD_ROOT/etc/{init.d,rc?.d} |
679be76f | 374 | |
38b89461 JR |
375 | # shipped in cups-filters |
376 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cups/banners | |
7616b8ed | 377 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cups/data/testprint |
38b89461 | 378 | |
9625f17f JB |
379 | %clean |
380 | rm -rf $RPM_BUILD_ROOT | |
381 | ||
168e60c2 | 382 | %post |
96792ec6 JR |
383 | # Deal with config migration due to CVE-2012-5519 (STR #4223) |
384 | _keywords="^\(AccessLog\|CacheDir\|ConfigFilePerm\|\ | |
385 | DataDir\|DocumentRoot\|ErrorLog\|FatalErrors\|\ | |
386 | FileDevice\|FontPath\|Group\|LogFilePerm\|\ | |
387 | LPDConfigFile\|PageLog\|Printcap\|PrintcapFormat\|\ | |
388 | RemoteRoot\|RequestRoot\|ServerBin\|ServerCertificate\|\ | |
389 | ServerKey\|ServerRoot\|SMBConfigFile\|StateDir\|\ | |
390 | SystemGroup\|SystemGroupAuthKey\|TempDir\|User\)" | |
391 | if [ -f %{_sysconfdir}/cups/cupsd.conf ] && grep -iq "$_keywords" %{_sysconfdir}/cups/cupsd.conf; then | |
392 | echo "# Settings automatically moved from cupsd.conf by RPM package:" >> %{_sysconfdir}/cups/cups-files.conf | |
393 | grep -i "$_keywords" %{_sysconfdir}/cups/cupsd.conf >> %{_sysconfdir}/cups/cups-files.conf || : | |
394 | %{__sed} -i -e "s,$_keywords,#&,ig" %{_sysconfdir}/cups/cupsd.conf || : | |
395 | fi | |
8a24ec7f | 396 | /sbin/chkconfig --add cups |
a73a2669 | 397 | %service cups restart "cups daemon" |
8b6d67b6 | 398 | /sbin/rmmod usblp > /dev/null 2>&1 || : |
304fa3b3 | 399 | %systemd_post cups.service cups.socket cups.path |
fb328468 | 400 | |
168e60c2 | 401 | %preun |
fd7e4ff1 | 402 | if [ "$1" = "0" ]; then |
a73a2669 | 403 | %service cups stop |
fd7e4ff1 | 404 | /sbin/chkconfig --del cups |
405 | fi | |
304fa3b3 | 406 | %systemd_preun cups.service cups.socket cups.path |
cdbbf080 JR |
407 | |
408 | %postun | |
409 | %systemd_reload | |
410 | ||
96792ec6 | 411 | %triggerpostun -- cups < 1:1.5.2-1 |
304fa3b3 | 412 | %systemd_trigger cups.service cups.socket cups.path |
168e60c2 | 413 | |
19e8d1ed | 414 | %post lib -p /sbin/ldconfig |
415 | %postun lib -p /sbin/ldconfig | |
416 | %post image-lib -p /sbin/ldconfig | |
417 | %postun image-lib -p /sbin/ldconfig | |
8bdc526e | 418 | |
84d9a886 JR |
419 | %post lpd |
420 | %service -q rc-inetd reload | |
421 | ||
422 | %postun lpd | |
423 | if [ "$1" = 0 ]; then | |
424 | %service -q rc-inetd reload | |
425 | fi | |
426 | ||
fd7e4ff1 | 427 | %files |
346112e3 | 428 | %defattr(644,root,root,755) |
4c209b1f | 429 | %doc *.txt |
39956f63 | 430 | %attr(640,root,root) %config %verify(not md5 mtime size) /etc/pam.d/* |
8bdc526e | 431 | %attr(754,root,root) /etc/rc.d/init.d/cups |
e809c01b | 432 | /etc/dbus-1/system.d/cups.conf |
19a74fff | 433 | /etc/modprobe.d/cups.conf |
cdbbf080 | 434 | %{systemdunitdir}/cups.service |
b65c711b JR |
435 | %{systemdunitdir}/cups.socket |
436 | %{systemdunitdir}/cups.path | |
cdbbf080 | 437 | %{systemdtmpfilesdir}/%{name}.conf |
6139e54a | 438 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/classes.conf |
885cd154 | 439 | %attr(640,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/cups-files.conf |
39956f63 | 440 | %attr(640,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/cupsd.conf |
3e1538e5 | 441 | %attr(640,root,lp) %{_sysconfdir}/%{name}/cupsd.conf.default |
daf27ba0 | 442 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/printers.conf |
60e0cb5a | 443 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mailto.conf |
3cb197ff | 444 | %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/snmp.conf |
cd29fb20 | 445 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.cups |
4017839a | 446 | %dir %attr(700,root,lp) %{_sysconfdir}/%{name}/ssl |
934a05d8 | 447 | %dir %{_sysconfdir}/%{name}/interfaces |
6139e54a | 448 | %dir %attr(755,root,lp) %{_sysconfdir}/%{name}/ppd |
39956f63 | 449 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} |
fd7e4ff1 | 450 | %attr(4755,lp,root) %{_bindir}/lppasswd |
3ddab923 | 451 | %attr(755,root,root) %{_bindir}/cupstestppd |
e809c01b | 452 | %attr(755,root,root) %{_bindir}/cupstestdsc |
25802dee | 453 | %attr(755,root,root) %{_bindir}/ppd* |
ceddaf82 | 454 | %attr(755,root,root) %{_sbindir}/cupsctl |
daf27ba0 | 455 | %attr(755,root,root) %{_sbindir}/cupsd |
ceddaf82 | 456 | %attr(755,root,root) %{_sbindir}/cupsfilter |
daf27ba0 | 457 | |
82f3f074 JK |
458 | %dir %{_ulibdir}/cups |
459 | %dir %{_ulibdir}/cups/* | |
daf27ba0 KK |
460 | %{_ulibdir}/cups/cgi-bin/help |
461 | %{_ulibdir}/cups/cgi-bin/images | |
462 | %attr(755,root,root) %{_ulibdir}/cups/cgi-bin/*.cgi | |
463 | %{_ulibdir}/cups/cgi-bin/*.css | |
464 | %{_ulibdir}/cups/cgi-bin/*.html | |
daf27ba0 | 465 | %{_ulibdir}/cups/cgi-bin/*.txt |
3e1538e5 JR |
466 | %lang(ca) %{_ulibdir}/cups/cgi-bin/ca |
467 | %lang(cs) %{_ulibdir}/cups/cgi-bin/cs | |
daf27ba0 | 468 | %lang(es) %{_ulibdir}/cups/cgi-bin/es |
cdbbf080 | 469 | %lang(fr) %{_ulibdir}/cups/cgi-bin/fr |
f72ae4ea | 470 | %lang(it) %{_ulibdir}/cups/cgi-bin/it |
daf27ba0 | 471 | %lang(ja) %{_ulibdir}/cups/cgi-bin/ja |
afacd72e | 472 | %lang(ru) %{_ulibdir}/cups/cgi-bin/ru |
daf27ba0 | 473 | |
bf51f358 JR |
474 | %if %{with avahi} |
475 | %attr(755,root,root) %{_ulibdir}/cups/backend/dnssd | |
476 | %attr(755,root,root) %{_ulibdir}/cups/backend/mdns | |
477 | %endif | |
ea79d226 ER |
478 | %attr(755,root,root) %{_ulibdir}/cups/backend/http |
479 | %attr(755,root,root) %{_ulibdir}/cups/backend/https | |
480 | %attr(755,root,root) %{_ulibdir}/cups/backend/ipp | |
ba7599c9 | 481 | %attr(755,root,root) %{_ulibdir}/cups/backend/ipp14 |
ea79d226 ER |
482 | %attr(755,root,root) %{_ulibdir}/cups/backend/ipps |
483 | %attr(755,root,root) %{_ulibdir}/cups/backend/lpd | |
484 | %attr(755,root,root) %{_ulibdir}/cups/backend/snmp | |
485 | %attr(755,root,root) %{_ulibdir}/cups/backend/socket | |
84d9a886 JR |
486 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-deviced |
487 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-driverd | |
d15c7d48 | 488 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-exec |
daf27ba0 KK |
489 | %attr(755,root,root) %{_ulibdir}/cups/filter/* |
490 | %attr(755,root,root) %{_ulibdir}/cups/monitor/* | |
491 | %attr(755,root,root) %{_ulibdir}/cups/notifier/* | |
492 | ||
7616b8ed | 493 | %dir %{_datadir}/cups/data |
6139e54a | 494 | %{_datadir}/cups/drivers |
25802dee AM |
495 | %{_datadir}/cups/drv |
496 | %{_datadir}/cups/examples | |
25802dee | 497 | %{_datadir}/cups/mime |
748a0bf9 | 498 | %dir %{_datadir}/cups/model |
748a0bf9 ER |
499 | # dirs for gimp-print-cups-4.2.7-1 |
500 | %dir %{_datadir}/cups/model/C | |
501 | %lang(da) %dir %{_datadir}/cups/model/da | |
502 | %lang(en_GB) %dir %{_datadir}/cups/model/en_GB | |
503 | %lang(fr) %dir %{_datadir}/cups/model/fr | |
504 | %lang(nb) %dir %{_datadir}/cups/model/nb | |
505 | %lang(pl) %dir %{_datadir}/cups/model/pl | |
506 | %lang(sv) %dir %{_datadir}/cups/model/sv | |
507 | ||
25802dee AM |
508 | %{_datadir}/cups/ppdc |
509 | ||
54906e64 ER |
510 | %dir %{_datadir}/cups/templates |
511 | %{_datadir}/cups/templates/*.tmpl | |
3e1538e5 JR |
512 | %lang(ca) %{_datadir}/cups/templates/ca |
513 | %lang(cs) %{_datadir}/cups/templates/cs | |
54906e64 | 514 | %lang(es) %{_datadir}/cups/templates/es |
cdbbf080 | 515 | %lang(fr) %{_datadir}/cups/templates/fr |
f72ae4ea | 516 | %lang(it) %{_datadir}/cups/templates/it |
54906e64 | 517 | %lang(ja) %{_datadir}/cups/templates/ja |
afacd72e | 518 | %lang(ru) %{_datadir}/cups/templates/ru |
c1555e94 | 519 | %{_mandir}/man1/cupstestppd.1* |
e809c01b | 520 | %{_mandir}/man1/cupstestdsc.1* |
0366ccc3 | 521 | %{_mandir}/man1/lppasswd.1* |
25802dee | 522 | %{_mandir}/man1/ppd*.1* |
4e75f969 JB |
523 | %{_mandir}/man7/backend.7* |
524 | %{_mandir}/man7/filter.7* | |
25802dee | 525 | %{_mandir}/man7/notifier.7* |
84d9a886 JR |
526 | %{_mandir}/man5/* |
527 | %{_mandir}/man8/accept.8* | |
528 | %{_mandir}/man8/cups-deviced.8* | |
529 | %{_mandir}/man8/cups-driverd.8* | |
885cd154 | 530 | %{_mandir}/man8/cups-snmp.8* |
84d9a886 JR |
531 | %{_mandir}/man8/cupsaddsmb.8* |
532 | %{_mandir}/man8/cupsctl.8* | |
533 | %{_mandir}/man8/cupsd.8* | |
534 | %{_mandir}/man8/cupsenable.8* | |
535 | %{_mandir}/man8/cupsfilter.8* | |
536 | %{_mandir}/man8/lp* | |
daf27ba0 KK |
537 | |
538 | %dir %attr(775,root,lp) /var/cache/cups | |
428f33ff KK |
539 | %dir %attr(755,root,lp) /var/lib/cups |
540 | %dir %attr(511,lp,sys) /var/lib/cups/certs | |
6139e54a | 541 | %dir %attr(755,root,lp) /var/run/cups |
daf27ba0 KK |
542 | %dir %attr(710,root,lp) /var/spool/cups |
543 | %dir %attr(1770,root,lp) /var/spool/cups/tmp | |
68e5a032 | 544 | %attr(600,lp,lp) %ghost /var/cache/cups/help.index |
6139e54a | 545 | %attr(640,root,lp) %ghost /var/cache/cups/job.cache |
68e5a032 | 546 | %attr(600,lp,lp) %ghost /var/cache/cups/ppds.dat |
6139e54a | 547 | %attr(640,root,lp) %ghost /var/cache/cups/remote.cache |
081a50cb | 548 | %attr(750,root,logs) %dir /var/log/archive/cups |
40183055 JK |
549 | %attr(750,root,logs) %dir /var/log/cups |
550 | %attr(640,root,logs) %ghost /var/log/cups/access_log | |
551 | %attr(640,root,logs) %ghost /var/log/cups/error_log | |
552 | %attr(640,root,logs) %ghost /var/log/cups/page_log | |
980a97fe | 553 | |
6ebf74dd AF |
554 | %files lib |
555 | %defattr(644,root,root,755) | |
3c247a25 | 556 | %dir %attr(755,root,lp) %{_sysconfdir}/%{name} |
6ebf74dd | 557 | %attr(755,root,root) %{_libdir}/libcups.so.* |
25802dee | 558 | %attr(755,root,root) %{_libdir}/libcupscgi.so.* |
25802dee AM |
559 | %attr(755,root,root) %{_libdir}/libcupsmime.so.* |
560 | %attr(755,root,root) %{_libdir}/libcupsppdc.so.* | |
a57fa410 | 561 | %dir %{_datadir}/cups |
3e1538e5 JR |
562 | %lang(ca) %{_datadir}/locale/ca/cups_ca.po |
563 | %lang(cs) %{_datadir}/locale/cs/cups_cs.po | |
a57fa410 | 564 | %lang(es) %{_datadir}/locale/es/cups_es.po |
a57fa410 | 565 | %lang(fr) %{_datadir}/locale/fr/cups_fr.po |
a57fa410 | 566 | %lang(it) %{_datadir}/locale/it/cups_it.po |
a57fa410 | 567 | %lang(ja) %{_datadir}/locale/ja/cups_ja.po |
a57fa410 | 568 | %lang(ru) %{_datadir}/locale/ru/cups_ru.po |
6ebf74dd | 569 | |
2da56f05 SZ |
570 | %files clients |
571 | %defattr(644,root,root,755) | |
8d2025a2 | 572 | %attr(644,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/client.conf |
2da56f05 | 573 | %attr(755,root,root) %{_bindir}/cancel |
885cd154 | 574 | %attr(755,root,root) %{_bindir}/ippfind |
d15c7d48 | 575 | %attr(755,root,root) %{_bindir}/ipptool |
2da56f05 SZ |
576 | %attr(755,root,root) %{_bindir}/lp |
577 | %attr(755,root,root) %{_bindir}/lpoptions | |
578 | %attr(755,root,root) %{_bindir}/lpq | |
579 | %attr(755,root,root) %{_bindir}/lpr | |
580 | %attr(755,root,root) %{_bindir}/lprm | |
581 | %attr(755,root,root) %{_bindir}/lpstat | |
501ef07e | 582 | %attr(755,root,root) %{_sbindir}/accept |
25802dee | 583 | %attr(755,root,root) %{_sbindir}/cupsaccept |
501ef07e | 584 | %attr(755,root,root) %{_sbindir}/cupsaddsmb |
eea94f34 | 585 | %attr(755,root,root) %{_sbindir}/cupsenable |
586 | %attr(755,root,root) %{_sbindir}/cupsdisable | |
25802dee | 587 | %attr(755,root,root) %{_sbindir}/cupsreject |
eea94f34 | 588 | %attr(755,root,root) %{_sbindir}/disable |
589 | %attr(755,root,root) %{_sbindir}/enable | |
501ef07e AM |
590 | %attr(755,root,root) %{_sbindir}/lpadmin |
591 | %attr(755,root,root) %{_sbindir}/lpc | |
592 | %attr(755,root,root) %{_sbindir}/lpinfo | |
593 | %attr(755,root,root) %{_sbindir}/lpmove | |
594 | %attr(755,root,root) %{_sbindir}/reject | |
d15c7d48 | 595 | %{_datadir}/cups/ipptool |
1770fa4c ER |
596 | %{_desktopdir}/cups.desktop |
597 | %{_iconsdir}/hicolor/*/apps/cups.png | |
93040bdf | 598 | %{_mandir}/man1/cancel.1* |
885cd154 | 599 | %{_mandir}/man1/ippfind.1* |
d15c7d48 | 600 | %{_mandir}/man1/ipptool.1* |
0366ccc3 AF |
601 | %{_mandir}/man1/lp.1* |
602 | %{_mandir}/man1/lpoptions.1* | |
603 | %{_mandir}/man1/lpq.1* | |
604 | %{_mandir}/man1/lpr.1* | |
605 | %{_mandir}/man1/lprm.1* | |
606 | %{_mandir}/man1/lpstat.1* | |
25802dee AM |
607 | %{_mandir}/man8/cupsaccept.8* |
608 | %{_mandir}/man8/cupsdisable.8* | |
609 | %{_mandir}/man8/cupsreject.8* | |
610 | %{_mandir}/man8/reject.8* | |
2da56f05 | 611 | |
6ebf74dd | 612 | %files image-lib |
fd7e4ff1 | 613 | %defattr(644,root,root,755) |
6ebf74dd | 614 | %attr(755,root,root) %{_libdir}/libcupsimage.so.* |
fd7e4ff1 | 615 | |
980a97fe | 616 | %files devel |
617 | %defattr(644,root,root,755) | |
6e2c2519 | 618 | %attr(755,root,root) %{_bindir}/cups-config |
4e75f969 | 619 | %attr(755,root,root) %{_libdir}/libcups.so |
25802dee | 620 | %attr(755,root,root) %{_libdir}/libcupscgi.so |
4e75f969 | 621 | %attr(755,root,root) %{_libdir}/libcupsimage.so |
25802dee AM |
622 | %attr(755,root,root) %{_libdir}/libcupsmime.so |
623 | %attr(755,root,root) %{_libdir}/libcupsppdc.so | |
980a97fe | 624 | %{_includedir}/cups |
4e75f969 | 625 | %{_mandir}/man1/cups-config.1* |
980a97fe | 626 | |
373aff1e | 627 | %if %{with static_libs} |
8d2025a2 AM |
628 | %files static |
629 | %defattr(644,root,root,755) | |
4e75f969 | 630 | %{_libdir}/libcups.a |
25802dee | 631 | %{_libdir}/libcupscgi.a |
4e75f969 | 632 | %{_libdir}/libcupsimage.a |
25802dee AM |
633 | %{_libdir}/libcupsmime.a |
634 | %{_libdir}/libcupsppdc.a | |
373aff1e | 635 | %endif |
2e2308c6 | 636 | |
0f8ac12d AF |
637 | %files backend-usb |
638 | %defattr(644,root,root,755) | |
82f3f074 | 639 | %attr(755,root,root) %{_ulibdir}/cups/backend/usb |
885cd154 JR |
640 | %dir %{_datadir}/cups/usb |
641 | %{_datadir}/cups/usb/org.cups.usb-quirks | |
0f8ac12d | 642 | |
84d9a886 JR |
643 | %files lpd |
644 | %defattr(644,root,root,755) | |
645 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/* | |
646 | %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-lpd | |
647 | %{_mandir}/man8/cups-lpd.8* |