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