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