]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
b34254bc | 2 | # "$Id$" |
ef416fc2 | 3 | # |
7f5ce42e | 4 | # RPM "spec" file for CUPS. |
ef416fc2 | 5 | # |
7f5ce42e | 6 | # Original version by Jason McMullan <jmcc@ontv.com>. |
ef416fc2 | 7 | # |
46cc8b81 | 8 | # Copyright 2007-2014 by Apple Inc. |
7f5ce42e | 9 | # Copyright 1999-2007 by Easy Software Products, all rights reserved. |
ef416fc2 | 10 | # |
7f5ce42e MS |
11 | # These coded instructions, statements, and computer programs are the |
12 | # property of Apple Inc. and are protected by Federal copyright | |
13 | # law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
14 | # which should have been included with this file. If this file is | |
15 | # file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 16 | # |
17 | ||
ecdc0628 | 18 | # Conditional build options (--with name/--without name): |
19 | # | |
20 | # dbus - Enable/disable DBUS support (default = enable) | |
f3c17241 | 21 | # dnssd - Enable/disable DNS-SD support (default = enable) |
7f5ce42e | 22 | # libusb1 - Enable/disable LIBUSB 1.0 support (default = enable) |
f3c17241 | 23 | # static - Enable/disable static libraries (default = enable) |
ecdc0628 | 24 | |
25 | %{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}} | |
26 | %{?_with_dbus: %define _dbus --enable-dbus} | |
27 | %{!?_with_dbus: %define _dbus --disable-dbus} | |
28 | ||
37e7e6e0 | 29 | %{!?_with_dnssd: %{!?_without_dnssd: %define _with_dnssd --with-dnssd}} |
f3c17241 MS |
30 | %{?_with_dnssd: %define _dnssd --enable-dnssd} |
31 | %{!?_with_dnssd: %define _dnssd --disable-dnssd} | |
32 | ||
7f5ce42e MS |
33 | %{!?_with_libusb1: %{!?_without_libusb1: %define _with_libusb1 --with-libusb1}} |
34 | %{?_with_libusb1: %define _libusb1 --enable-libusb} | |
35 | %{!?_with_libusb1: %define _libusb1 --disable-libusb} | |
36 | ||
d6ae789d | 37 | %{!?_with_static: %{!?_without_static: %define _without_static --without-static}} |
38 | %{?_with_static: %define _static --enable-static} | |
39 | %{!?_with_static: %define _static --disable-static} | |
40 | ||
8c29c890 MS |
41 | %{!?_with_systemd: %{!?_without_systemd: %define _with_systemd --with-systemd}} |
42 | %{?_with_systemd: %define _systemd --enable-systemd} | |
43 | %{!?_with_systemd: %define _systemd --disable-systemd} | |
44 | ||
9aff70cc | 45 | Summary: CUPS |
ef416fc2 | 46 | Name: cups |
47 | Version: @CUPS_VERSION@ | |
48 | Release: 0 | |
49 | Epoch: 1 | |
50 | License: GPL | |
51 | Group: System Environment/Daemons | |
f3c17241 | 52 | Source: http://ftp.cups.org/pub/cups/%{version}/cups-%{version}-source.tar.bz2 |
ef416fc2 | 53 | Url: http://www.cups.org |
54 | Packager: Anonymous <anonymous@foo.com> | |
bc44d920 | 55 | Vendor: Apple Inc. |
ef416fc2 | 56 | |
7f5ce42e | 57 | # Package names are as defined for Red Hat (and clone) distributions |
93aa5239 MS |
58 | BuildRequires: gnutls-devel, pam-devel |
59 | ||
7f5ce42e MS |
60 | %if %{?_with_dbus:1}%{!?_with_dbus:0} |
61 | BuildRequires: dbus-devel | |
62 | %endif | |
63 | ||
64 | %if %{?_with_dnssd:1}%{!?_with_dnssd:0} | |
65 | BuildRequires: avahi-devel | |
66 | %endif | |
67 | ||
68 | %if %{?_with_libusb1:1}%{!?_with_libusb1:0} | |
995b120a | 69 | BuildRequires: libusb-devel >= 1.0 |
7f5ce42e MS |
70 | %endif |
71 | ||
8c29c890 MS |
72 | %if %{?_with_systemd:1}%{!?_with_systemd:0} |
73 | BuildRequires: systemd-devel | |
74 | %endif | |
75 | ||
ef416fc2 | 76 | # Use buildroot so as not to disturb the version already installed |
77 | BuildRoot: /tmp/%{name}-root | |
78 | ||
79 | # Dependencies... | |
80 | Requires: %{name}-libs = %{epoch}:%{version} | |
81 | Obsoletes: lpd, lpr, LPRng | |
82 | Provides: lpd, lpr, LPRng | |
75bd9771 MS |
83 | Obsoletes: cups-da, cups-de, cups-es, cups-et, cups-fi, cups-fr, cups-he |
84 | Obsoletes: cups-id, cups-it, cups-ja, cups-ko, cups-nl, cups-no, cups-pl | |
85 | Obsoletes: cups-pt, cups-ru, cups-sv, cups-zh | |
ef416fc2 | 86 | |
87 | %package devel | |
9aff70cc | 88 | Summary: CUPS - development environment |
ef416fc2 | 89 | Group: Development/Libraries |
90 | Requires: %{name}-libs = %{epoch}:%{version} | |
91 | ||
92 | %package libs | |
9aff70cc | 93 | Summary: CUPS - shared libraries |
ef416fc2 | 94 | Group: System Environment/Libraries |
95 | Provides: libcups1 | |
96 | ||
97 | %package lpd | |
9aff70cc | 98 | Summary: CUPS - LPD support |
ef416fc2 | 99 | Group: System Environment/Daemons |
100 | Requires: %{name} = %{epoch}:%{version} xinetd | |
101 | ||
102 | %description | |
9aff70cc | 103 | CUPS is the standards-based, open source printing system developed by |
f3c17241 | 104 | Apple Inc. for OS X and other UNIX®-like operating systems. |
ef416fc2 | 105 | |
106 | %description devel | |
9aff70cc | 107 | This package provides the CUPS headers and development environment. |
ef416fc2 | 108 | |
109 | %description libs | |
9aff70cc | 110 | This package provides the CUPS shared libraries. |
ef416fc2 | 111 | |
112 | %description lpd | |
9aff70cc | 113 | This package provides LPD client support. |
ef416fc2 | 114 | |
115 | %prep | |
116 | %setup | |
117 | ||
118 | %build | |
e1d6a774 | 119 | CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \ |
7f5ce42e | 120 | ./configure %{_dbus} %{_dnssd} %{_libusb1} %{_static} |
ef416fc2 | 121 | # If we got this far, all prerequisite libraries must be here. |
122 | make | |
123 | ||
124 | %install | |
125 | # Make sure the RPM_BUILD_ROOT directory exists. | |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
128 | make BUILDROOT=$RPM_BUILD_ROOT install | |
ab428cc0 | 129 | rm -rf $RPM_BUILD_ROOT/usr/share/cups/banners $RPM_BUILD_ROOT/usr/share/cups/data |
ef416fc2 | 130 | |
131 | %post | |
bd7854cb | 132 | /sbin/chkconfig --add cups |
133 | /sbin/chkconfig cups on | |
ef416fc2 | 134 | |
bd7854cb | 135 | # Restart cupsd if we are upgrading... |
136 | if test $1 -gt 1; then | |
137 | /sbin/service cups stop | |
138 | /sbin/service cups start | |
ef416fc2 | 139 | fi |
140 | ||
bd7854cb | 141 | %post libs |
142 | /sbin/ldconfig | |
ef416fc2 | 143 | |
144 | %preun | |
bd7854cb | 145 | if test $1 = 0; then |
146 | /sbin/service cups stop | |
147 | /sbin/chkconfig --del cups | |
ef416fc2 | 148 | fi |
149 | ||
bd7854cb | 150 | %postun |
151 | if test $1 -ge 1; then | |
152 | /sbin/service cups stop | |
153 | /sbin/service cups start | |
ef416fc2 | 154 | fi |
155 | ||
bd7854cb | 156 | %postun libs |
157 | /sbin/ldconfig | |
158 | ||
ef416fc2 | 159 | %clean |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
162 | %files | |
bd7854cb | 163 | %docdir /usr/share/doc/cups |
ef416fc2 | 164 | %defattr(-,root,root) |
165 | %dir /etc/cups | |
166 | %config(noreplace) /etc/cups/*.conf | |
fa73b229 | 167 | /etc/cups/cupsd.conf.default |
ef416fc2 | 168 | %dir /etc/cups/interfaces |
ef416fc2 | 169 | %dir /etc/cups/ppd |
8ca02f3c | 170 | %attr(0700,root,root) %dir /etc/cups/ssl |
bd7854cb | 171 | |
ecdc0628 | 172 | %if %{?_with_dbus:1}%{!?_with_dbus:0} |
bd7854cb | 173 | # DBUS |
174 | /etc/dbus-1/system.d/* | |
ecdc0628 | 175 | %endif |
bd7854cb | 176 | |
177 | # PAM | |
ef416fc2 | 178 | %dir /etc/pam.d |
179 | /etc/pam.d/* | |
180 | ||
8c29c890 MS |
181 | %if %{?_with_systemd:1}%{!?_with_systemd:0} |
182 | # SystemD | |
183 | /usr/lib/systemd/system/* | |
ef416fc2 | 184 | |
8c29c890 MS |
185 | %else |
186 | # Legacy init support on Linux | |
ef416fc2 | 187 | /etc/init.d/* |
188 | /etc/rc0.d/* | |
189 | /etc/rc2.d/* | |
190 | /etc/rc3.d/* | |
191 | /etc/rc5.d/* | |
8c29c890 | 192 | %endif |
ef416fc2 | 193 | |
194 | /usr/bin/cancel | |
80ca4592 | 195 | /usr/bin/cupstestdsc |
ef416fc2 | 196 | /usr/bin/cupstestppd |
ad0357ca | 197 | /usr/bin/ippfind |
aaf19ab0 | 198 | /usr/bin/ipptool |
ef416fc2 | 199 | /usr/bin/lp* |
200 | %dir /usr/lib/cups | |
201 | %dir /usr/lib/cups/backend | |
f3c17241 | 202 | %if %{?_with_dnssd:1}%{!?_with_dnssd:0} |
37e7e6e0 | 203 | # DNS-SD |
f3c17241 MS |
204 | /usr/lib/cups/backend/dnssd |
205 | %endif | |
e00b005a | 206 | /usr/lib/cups/backend/http |
f99f3698 | 207 | /usr/lib/cups/backend/https |
7ff4fea9 | 208 | %attr(0700,root,root) /usr/lib/cups/backend/ipp |
f99f3698 | 209 | /usr/lib/cups/backend/ipps |
e00b005a | 210 | %attr(0700,root,root) /usr/lib/cups/backend/lpd |
89d46774 | 211 | /usr/lib/cups/backend/snmp |
4400e98d | 212 | /usr/lib/cups/backend/socket |
e00b005a | 213 | /usr/lib/cups/backend/usb |
ef416fc2 | 214 | %dir /usr/lib/cups/cgi-bin |
215 | /usr/lib/cups/cgi-bin/* | |
216 | %dir /usr/lib/cups/daemon | |
217 | /usr/lib/cups/daemon/cups-deviced | |
218 | /usr/lib/cups/daemon/cups-driverd | |
f99f3698 | 219 | /usr/lib/cups/daemon/cups-exec |
ef416fc2 | 220 | %dir /usr/lib/cups/driver |
221 | %dir /usr/lib/cups/filter | |
222 | /usr/lib/cups/filter/* | |
bd7854cb | 223 | %dir /usr/lib/cups/monitor |
224 | /usr/lib/cups/monitor/* | |
ef416fc2 | 225 | %dir /usr/lib/cups/notifier |
226 | /usr/lib/cups/notifier/* | |
227 | ||
228 | /usr/sbin/* | |
229 | %dir /usr/share/cups | |
634763e8 MS |
230 | %dir /usr/share/cups/drv |
231 | /usr/share/cups/drv/* | |
aaf19ab0 MS |
232 | %dir /usr/share/cups/ipptool |
233 | /usr/share/cups/ipptool/* | |
dd1abb6b MS |
234 | %dir /usr/share/cups/mime |
235 | /usr/share/cups/mime/* | |
d6ae789d | 236 | %dir /usr/share/cups/model |
ac884b6a MS |
237 | %dir /usr/share/cups/ppdc |
238 | /usr/share/cups/ppdc/* | |
d6ae789d | 239 | %dir /usr/share/cups/templates |
634763e8 | 240 | /usr/share/cups/templates/* |
46cc8b81 | 241 | %if %{?_with_libusb1:1}%{!?_with_libusb1:0} |
7f5ce42e | 242 | # LIBUSB quirks files |
89a65306 MS |
243 | %dir /usr/share/cups/usb |
244 | /usr/share/cups/usb/* | |
7f5ce42e | 245 | %endif |
89a65306 | 246 | |
ef416fc2 | 247 | %dir /usr/share/doc/cups |
248 | /usr/share/doc/cups/*.* | |
249 | %dir /usr/share/doc/cups/help | |
09a101d6 | 250 | /usr/share/doc/cups/help/accounting.html |
4744bd90 | 251 | /usr/share/doc/cups/help/cgi.html |
252 | /usr/share/doc/cups/help/glossary.html | |
355e94dc | 253 | /usr/share/doc/cups/help/kerberos.html |
4744bd90 | 254 | /usr/share/doc/cups/help/license.html |
ef416fc2 | 255 | /usr/share/doc/cups/help/man-*.html |
256 | /usr/share/doc/cups/help/network.html | |
4744bd90 | 257 | /usr/share/doc/cups/help/options.html |
ef416fc2 | 258 | /usr/share/doc/cups/help/overview.html |
8ca02f3c | 259 | /usr/share/doc/cups/help/policies.html |
4744bd90 | 260 | /usr/share/doc/cups/help/ref-*.html |
261 | /usr/share/doc/cups/help/security.html | |
d2354e63 | 262 | /usr/share/doc/cups/help/sharing.html |
4744bd90 | 263 | /usr/share/doc/cups/help/translation.html |
ef416fc2 | 264 | %dir /usr/share/doc/cups/images |
265 | /usr/share/doc/cups/images/* | |
37e7e6e0 | 266 | |
8c29c890 MS |
267 | #%dir /usr/share/doc/cups/ca |
268 | #/usr/share/doc/cups/ca/* | |
269 | #%dir /usr/share/doc/cups/cs | |
270 | #/usr/share/doc/cups/cs/* | |
f28a1eaf MS |
271 | %dir /usr/share/doc/cups/es |
272 | /usr/share/doc/cups/es/* | |
8c29c890 MS |
273 | #%dir /usr/share/doc/cups/fr |
274 | #/usr/share/doc/cups/fr/* | |
275 | #%dir /usr/share/doc/cups/ja | |
276 | #/usr/share/doc/cups/ja/* | |
277 | #%dir /usr/share/doc/cups/ru | |
278 | #/usr/share/doc/cups/ru/* | |
279 | ||
071b2906 MS |
280 | %dir /usr/share/locale/ca |
281 | /usr/share/locale/ca/cups_ca.po | |
282 | %dir /usr/share/locale/cs | |
283 | /usr/share/locale/cs/cups_cs.po | |
284 | %dir /usr/share/locale/es | |
285 | /usr/share/locale/es/cups_es.po | |
286 | %dir /usr/share/locale/fr | |
287 | /usr/share/locale/fr/cups_fr.po | |
f463b80c MS |
288 | %dir /usr/share/locale/it |
289 | /usr/share/locale/it/cups_it.po | |
071b2906 MS |
290 | %dir /usr/share/locale/ja |
291 | /usr/share/locale/ja/cups_ja.po | |
292 | %dir /usr/share/locale/ru | |
293 | /usr/share/locale/ru/cups_ru.po | |
ef416fc2 | 294 | |
295 | %dir /usr/share/man/man1 | |
296 | /usr/share/man/man1/cancel.1.gz | |
240214ef | 297 | /usr/share/man/man1/cups.1.gz |
80ca4592 | 298 | /usr/share/man/man1/cupstestdsc.1.gz |
ef416fc2 | 299 | /usr/share/man/man1/cupstestppd.1.gz |
ad0357ca | 300 | /usr/share/man/man1/ippfind.1.gz |
aaf19ab0 | 301 | /usr/share/man/man1/ipptool.1.gz |
ef416fc2 | 302 | /usr/share/man/man1/lp.1.gz |
303 | /usr/share/man/man1/lpoptions.1.gz | |
ef416fc2 | 304 | /usr/share/man/man1/lpq.1.gz |
305 | /usr/share/man/man1/lpr.1.gz | |
306 | /usr/share/man/man1/lprm.1.gz | |
307 | /usr/share/man/man1/lpstat.1.gz | |
308 | %dir /usr/share/man/man5 | |
ac884b6a | 309 | /usr/share/man/man5/*.conf.5.gz |
aaf19ab0 | 310 | /usr/share/man/man5/ipptoolfile.5.gz |
ac884b6a | 311 | /usr/share/man/man5/mime.*.5.gz |
ef416fc2 | 312 | %dir /usr/share/man/man8 |
313 | /usr/share/man/man8/accept.8.gz | |
d95bd167 MS |
314 | /usr/share/man/man8/cups-deviced.8.gz |
315 | /usr/share/man/man8/cups-driverd.8.gz | |
316 | /usr/share/man/man8/cups-exec.8.gz | |
317 | /usr/share/man/man8/cups-snmp.8.gz | |
ef416fc2 | 318 | /usr/share/man/man8/cupsaddsmb.8.gz |
1f6f3dbc | 319 | /usr/share/man/man8/cupsaccept.8.gz |
bc44d920 | 320 | /usr/share/man/man8/cupsctl.8.gz |
355e94dc | 321 | /usr/share/man/man8/cupsfilter.8.gz |
ef416fc2 | 322 | /usr/share/man/man8/cupsd.8.gz |
240214ef MS |
323 | /usr/share/man/man8/cupsd-helper.8.gz |
324 | /usr/share/man/man8/cupsd-logs.8.gz | |
ef416fc2 | 325 | /usr/share/man/man8/cupsdisable.8.gz |
326 | /usr/share/man/man8/cupsenable.8.gz | |
1f6f3dbc | 327 | /usr/share/man/man8/cupsreject.8.gz |
ef416fc2 | 328 | /usr/share/man/man8/lpadmin.8.gz |
329 | /usr/share/man/man8/lpc.8.gz | |
330 | /usr/share/man/man8/lpinfo.8.gz | |
331 | /usr/share/man/man8/lpmove.8.gz | |
332 | /usr/share/man/man8/reject.8.gz | |
333 | ||
334 | %dir /var/cache/cups | |
f7deaa1a | 335 | %attr(0775,root,sys) %dir /var/cache/cups/rss |
ef416fc2 | 336 | %dir /var/log/cups |
337 | %dir /var/run/cups | |
bd7854cb | 338 | %attr(0711,lp,sys) %dir /var/run/cups/certs |
339 | %attr(0710,lp,sys) %dir /var/spool/cups | |
340 | %attr(1770,lp,sys) %dir /var/spool/cups/tmp | |
ef416fc2 | 341 | |
e1d6a774 | 342 | # Desktop files |
343 | /usr/share/applications/* | |
344 | /usr/share/icons/* | |
345 | ||
ef416fc2 | 346 | %files devel |
347 | %defattr(-,root,root) | |
e6013cfa MS |
348 | %dir /usr/share/cups/examples |
349 | /usr/share/cups/examples/* | |
ef416fc2 | 350 | %dir /usr/share/man/man1 |
ef416fc2 | 351 | /usr/share/man/man1/cups-config.1.gz |
ac884b6a MS |
352 | /usr/share/man/man1/ppd*.1.gz |
353 | %dir /usr/share/man/man5 | |
354 | /usr/share/man/man5/ppdcfile.5.gz | |
355 | /usr/share/man/man7/backend.7.gz | |
356 | /usr/share/man/man7/filter.7.gz | |
178cb736 | 357 | /usr/share/man/man7/notifier.7.gz |
ef416fc2 | 358 | |
359 | /usr/bin/cups-config | |
ac884b6a | 360 | /usr/bin/ppd* |
ef416fc2 | 361 | %dir /usr/include/cups |
362 | /usr/include/cups/* | |
e1d6a774 | 363 | /usr/lib*/*.so |
ef416fc2 | 364 | |
d6ae789d | 365 | %if %{?_with_static:1}%{!?_with_static:0} |
366 | /usr/lib*/*.a | |
367 | %endif | |
368 | ||
ef416fc2 | 369 | %dir /usr/share/doc/cups/help |
370 | /usr/share/doc/cups/help/api*.html | |
e6013cfa MS |
371 | /usr/share/doc/cups/help/postscript-driver.html |
372 | /usr/share/doc/cups/help/ppd-compiler.html | |
373 | /usr/share/doc/cups/help/raster-driver.html | |
ef416fc2 | 374 | /usr/share/doc/cups/help/spec*.html |
375 | ||
376 | %files libs | |
377 | %defattr(-,root,root) | |
e1d6a774 | 378 | /usr/lib*/*.so.* |
ef416fc2 | 379 | |
380 | %files lpd | |
381 | %defattr(-,root,root) | |
e1d6a774 | 382 | /etc/xinetd.d/cups-lpd |
ef416fc2 | 383 | %dir /usr/lib/cups |
384 | %dir /usr/lib/cups/daemon | |
385 | /usr/lib/cups/daemon/cups-lpd | |
386 | %dir /usr/share/man/man8 | |
387 | /usr/share/man/man8/cups-lpd.8.gz | |
388 | ||
b423cd4c | 389 | |
ef416fc2 | 390 | # |
b34254bc | 391 | # End of "$Id$". |
ef416fc2 | 392 | # |