]> git.ipfire.org Git - thirdparty/cups.git/blob - packaging/cups.spec.in
Merge changes from CUPS 1.4svn-r8329.
[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 the Common UNIX Printing System (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: Common UNIX Printing System
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: Common UNIX Printing System - development environment
60 Group: Development/Libraries
61 Requires: %{name}-libs = %{epoch}:%{version}
62
63 %package libs
64 Summary: Common UNIX Printing System - shared libraries
65 Group: System Environment/Libraries
66 Provides: libcups1
67
68 %package lpd
69 Summary: Common UNIX Printing System - 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: Common UNIX Printing System - PHP support
76 Group: Development/Languages
77 Requires: %{name}-libs = %{epoch}:%{version}
78 %endif
79
80 %description
81 The Common UNIX Printing System provides a portable printing layer for
82 UNIX® operating systems. It was developed by Easy Software Products
83 to promote a standard printing solution for all UNIX vendors and users
84 and is now owned by Apple Inc. CUPS provides the System V and Berkeley
85 command-line interfaces.
86
87 %description devel
88 The Common UNIX Printing System provides a portable printing layer for
89 UNIX® operating systems. This is the development package for creating
90 additional printer drivers and other CUPS services.
91
92 %description libs
93 The Common UNIX Printing System provides a portable printing layer for
94 UNIX® operating systems. This package contains the CUPS shared libraries.
95
96 %description lpd
97 The Common UNIX Printing System provides a portable printing layer for
98 UNIX® operating systems. This package provides LPD client support.
99
100 %if %{?_with_php:1}%{!?_with_php:0}
101 %description php
102 The Common UNIX Printing System provides a portable printing layer for
103 UNIX® operating systems. This package provides PHP support.
104 %endif
105
106 %prep
107 %setup
108
109 %build
110 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
111 ./configure %{_dbus} %{_php} %{_static}
112 # If we got this far, all prerequisite libraries must be here.
113 make
114
115 %install
116 # Make sure the RPM_BUILD_ROOT directory exists.
117 rm -rf $RPM_BUILD_ROOT
118
119 make BUILDROOT=$RPM_BUILD_ROOT install
120
121 %post
122 /sbin/chkconfig --add cups
123 /sbin/chkconfig cups on
124
125 # Restart cupsd if we are upgrading...
126 if test $1 -gt 1; then
127 /sbin/service cups stop
128 /sbin/service cups start
129 fi
130
131 %post libs
132 /sbin/ldconfig
133
134 %preun
135 if test $1 = 0; then
136 /sbin/service cups stop
137 /sbin/chkconfig --del cups
138 fi
139
140 %postun
141 if test $1 -ge 1; then
142 /sbin/service cups stop
143 /sbin/service cups start
144 fi
145
146 %postun libs
147 /sbin/ldconfig
148
149 %clean
150 rm -rf $RPM_BUILD_ROOT
151
152 %files
153 %docdir /usr/share/doc/cups
154 %defattr(-,root,root)
155 %dir /etc/cups
156 %config(noreplace) /etc/cups/*.conf
157 /etc/cups/cupsd.conf.default
158 %dir /etc/cups/interfaces
159 %dir /etc/cups/ppd
160 %attr(0700,root,root) %dir /etc/cups/ssl
161
162 %if %{?_with_dbus:1}%{!?_with_dbus:0}
163 # DBUS
164 /etc/dbus-1/system.d/*
165 %endif
166
167 # PAM
168 %dir /etc/pam.d
169 /etc/pam.d/*
170
171 # RC dirs are a pain under Linux... Uncomment the appropriate ones if you
172 # don't use Red Hat or Mandrake...
173
174 /etc/init.d/*
175 /etc/rc0.d/*
176 /etc/rc2.d/*
177 /etc/rc3.d/*
178 /etc/rc5.d/*
179
180 # OLD RedHat/Mandrake
181 #/etc/rc.d/init.d/*
182 #/etc/rc.d/rc0.d/*
183 #/etc/rc.d/rc2.d/*
184 #/etc/rc.d/rc3.d/*
185 #/etc/rc.d/rc5.d/*
186
187 #/sbin/rc.d/*
188 #/sbin/rc.d/rc0.d/*
189 #/sbin/rc.d/rc2.d/*
190 #/sbin/rc.d/rc3.d/*
191 #/sbin/rc.d/rc5.d/*
192
193 /usr/bin/cancel
194 /usr/bin/cupstestdsc
195 /usr/bin/cupstestppd
196 /usr/bin/lp*
197 %dir /usr/lib/cups
198 %dir /usr/lib/cups/backend
199 /usr/lib/cups/backend/http
200 %attr(0700,root,root) /usr/lib/cups/backend/ipp
201 %attr(0700,root,root) /usr/lib/cups/backend/lpd
202 /usr/lib/cups/backend/parallel
203 /usr/lib/cups/backend/scsi
204 /usr/lib/cups/backend/serial
205 /usr/lib/cups/backend/snmp
206 /usr/lib/cups/backend/socket
207 /usr/lib/cups/backend/usb
208 %dir /usr/lib/cups/cgi-bin
209 /usr/lib/cups/cgi-bin/*
210 %dir /usr/lib/cups/daemon
211 /usr/lib/cups/daemon/cups-deviced
212 /usr/lib/cups/daemon/cups-driverd
213 /usr/lib/cups/daemon/cups-polld
214 %dir /usr/lib/cups/driver
215 %dir /usr/lib/cups/filter
216 /usr/lib/cups/filter/*
217 %dir /usr/lib/cups/monitor
218 /usr/lib/cups/monitor/*
219 %dir /usr/lib/cups/notifier
220 /usr/lib/cups/notifier/*
221
222 /usr/sbin/*
223 %dir /usr/share/cups
224 %dir /usr/share/cups/banners
225 /usr/share/cups/banners/*
226 %dir /usr/share/cups/charmaps
227 /usr/share/cups/charmaps/*
228 %dir /usr/share/cups/charsets
229 /usr/share/cups/charsets/*
230 %dir /usr/share/cups/data
231 /usr/share/cups/data/*
232 %dir /usr/share/cups/drv
233 /usr/share/cups/drv/*
234 %dir /usr/share/cups/fonts
235 /usr/share/cups/fonts/*
236 %dir /usr/share/cups/mime
237 /usr/share/cups/mime/*
238 %dir /usr/share/cups/model
239 %dir /usr/share/cups/ppdc
240 /usr/share/cups/ppdc/*
241 %dir /usr/share/cups/templates
242 /usr/share/cups/templates/*
243 %dir /usr/share/doc/cups
244 /usr/share/doc/cups/*.*
245 %dir /usr/share/doc/cups/es
246 /usr/share/doc/cups/es/*
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 #