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