]> git.ipfire.org Git - thirdparty/cups.git/blob - packaging/cups.spec.in
Merge changes from CUPS 1.4svn-r7994.
[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-2008 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 %ifarch x86_64
111 ./configure --enable-32bit %{_dbus} %{_php} %{_static}
112 %else
113 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
114 ./configure %{_dbus} %{_php} %{_static}
115 %endif
116 # If we got this far, all prerequisite libraries must be here.
117 make
118
119 %install
120 # Make sure the RPM_BUILD_ROOT directory exists.
121 rm -rf $RPM_BUILD_ROOT
122
123 make BUILDROOT=$RPM_BUILD_ROOT install
124
125 %post
126 /sbin/chkconfig --add cups
127 /sbin/chkconfig cups on
128
129 # Restart cupsd if we are upgrading...
130 if test $1 -gt 1; then
131 /sbin/service cups stop
132 /sbin/service cups start
133 fi
134
135 %post libs
136 /sbin/ldconfig
137
138 %preun
139 if test $1 = 0; then
140 /sbin/service cups stop
141 /sbin/chkconfig --del cups
142 fi
143
144 %postun
145 if test $1 -ge 1; then
146 /sbin/service cups stop
147 /sbin/service cups start
148 fi
149
150 %postun libs
151 /sbin/ldconfig
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %files
157 %docdir /usr/share/doc/cups
158 %defattr(-,root,root)
159 %dir /etc/cups
160 %config(noreplace) /etc/cups/*.conf
161 /etc/cups/cupsd.conf.default
162 %dir /etc/cups/interfaces
163 %dir /etc/cups/ppd
164 %attr(0700,root,root) %dir /etc/cups/ssl
165
166 %if %{?_with_dbus:1}%{!?_with_dbus:0}
167 # DBUS
168 /etc/dbus-1/system.d/*
169 %endif
170
171 # PAM
172 %dir /etc/pam.d
173 /etc/pam.d/*
174
175 # RC dirs are a pain under Linux... Uncomment the appropriate ones if you
176 # don't use Red Hat or Mandrake...
177
178 /etc/init.d/*
179 /etc/rc0.d/*
180 /etc/rc2.d/*
181 /etc/rc3.d/*
182 /etc/rc5.d/*
183
184 # OLD RedHat/Mandrake
185 #/etc/rc.d/init.d/*
186 #/etc/rc.d/rc0.d/*
187 #/etc/rc.d/rc2.d/*
188 #/etc/rc.d/rc3.d/*
189 #/etc/rc.d/rc5.d/*
190
191 #/sbin/rc.d/*
192 #/sbin/rc.d/rc0.d/*
193 #/sbin/rc.d/rc2.d/*
194 #/sbin/rc.d/rc3.d/*
195 #/sbin/rc.d/rc5.d/*
196
197 /usr/bin/cancel
198 /usr/bin/cupstestdsc
199 /usr/bin/cupstestppd
200 /usr/bin/lp*
201 %dir /usr/lib/cups
202 %dir /usr/lib/cups/backend
203 /usr/lib/cups/backend/http
204 %attr(0700,root,root) /usr/lib/cups/backend/ipp
205 %attr(0700,root,root) /usr/lib/cups/backend/lpd
206 /usr/lib/cups/backend/parallel
207 /usr/lib/cups/backend/scsi
208 /usr/lib/cups/backend/serial
209 /usr/lib/cups/backend/snmp
210 /usr/lib/cups/backend/socket
211 /usr/lib/cups/backend/usb
212 %dir /usr/lib/cups/cgi-bin
213 /usr/lib/cups/cgi-bin/*
214 %dir /usr/lib/cups/daemon
215 /usr/lib/cups/daemon/cups-deviced
216 /usr/lib/cups/daemon/cups-driverd
217 /usr/lib/cups/daemon/cups-polld
218 %dir /usr/lib/cups/driver
219 %dir /usr/lib/cups/filter
220 /usr/lib/cups/filter/*
221 %dir /usr/lib/cups/monitor
222 /usr/lib/cups/monitor/*
223 %dir /usr/lib/cups/notifier
224 /usr/lib/cups/notifier/*
225
226 /usr/sbin/*
227 %dir /usr/share/cups
228 %dir /usr/share/cups/banners
229 /usr/share/cups/banners/*
230 %dir /usr/share/cups/charmaps
231 /usr/share/cups/charmaps/*
232 %dir /usr/share/cups/charsets
233 /usr/share/cups/charsets/*
234 %dir /usr/share/cups/data
235 /usr/share/cups/data/*
236 %dir /usr/share/cups/drv
237 /usr/share/cups/drv/*
238 %dir /usr/share/cups/fonts
239 /usr/share/cups/fonts/*
240 %dir /usr/share/cups/mime
241 /usr/share/cups/mime/*
242 %dir /usr/share/cups/model
243 %dir /usr/share/cups/ppdc
244 /usr/share/cups/ppdc/*
245 %dir /usr/share/cups/templates
246 /usr/share/cups/templates/*
247 %dir /usr/share/doc/cups
248 /usr/share/doc/cups/*.*
249 %dir /usr/share/doc/cups/help
250 /usr/share/doc/cups/help/accounting.html
251 /usr/share/doc/cups/help/cgi.html
252 /usr/share/doc/cups/help/glossary.html
253 /usr/share/doc/cups/help/kerberos.html
254 /usr/share/doc/cups/help/license.html
255 /usr/share/doc/cups/help/man-*.html
256 /usr/share/doc/cups/help/network.html
257 /usr/share/doc/cups/help/options.html
258 /usr/share/doc/cups/help/overview.html
259 /usr/share/doc/cups/help/policies.html
260 /usr/share/doc/cups/help/ref-*.html
261 /usr/share/doc/cups/help/security.html
262 /usr/share/doc/cups/help/standard.html
263 /usr/share/doc/cups/help/translation.html
264 /usr/share/doc/cups/help/whatsnew.html
265 %dir /usr/share/doc/cups/images
266 /usr/share/doc/cups/images/*
267 /usr/share/locale/*
268
269 %dir /usr/share/man/man1
270 /usr/share/man/man1/cancel.1.gz
271 /usr/share/man/man1/cupstestdsc.1.gz
272 /usr/share/man/man1/cupstestppd.1.gz
273 /usr/share/man/man1/lp.1.gz
274 /usr/share/man/man1/lpoptions.1.gz
275 /usr/share/man/man1/lppasswd.1.gz
276 /usr/share/man/man1/lpq.1.gz
277 /usr/share/man/man1/lpr.1.gz
278 /usr/share/man/man1/lprm.1.gz
279 /usr/share/man/man1/lpstat.1.gz
280 %dir /usr/share/man/man5
281 /usr/share/man/man5/*.conf.5.gz
282 /usr/share/man/man5/mime.*.5.gz
283 %dir /usr/share/man/man7
284 /usr/share/man/man7/commandto*
285 /usr/share/man/man7/drv*
286 /usr/share/man/man7/rasterto*
287 %dir /usr/share/man/man8
288 /usr/share/man/man8/accept.8.gz
289 /usr/share/man/man8/cupsaddsmb.8.gz
290 /usr/share/man/man8/cupsaccept.8.gz
291 /usr/share/man/man8/cupsctl.8.gz
292 /usr/share/man/man8/cupsfilter.8.gz
293 /usr/share/man/man8/cupsd.8.gz
294 /usr/share/man/man8/cupsdisable.8.gz
295 /usr/share/man/man8/cupsenable.8.gz
296 /usr/share/man/man8/cupsreject.8.gz
297 /usr/share/man/man8/cups-deviced.8.gz
298 /usr/share/man/man8/cups-driverd.8.gz
299 /usr/share/man/man8/cups-polld.8.gz
300 /usr/share/man/man8/lpadmin.8.gz
301 /usr/share/man/man8/lpc.8.gz
302 /usr/share/man/man8/lpinfo.8.gz
303 /usr/share/man/man8/lpmove.8.gz
304 /usr/share/man/man8/reject.8.gz
305
306 %dir /var/cache/cups
307 %attr(0775,root,sys) %dir /var/cache/cups/rss
308 %dir /var/log/cups
309 %dir /var/run/cups
310 %attr(0711,lp,sys) %dir /var/run/cups/certs
311 %attr(0710,lp,sys) %dir /var/spool/cups
312 %attr(1770,lp,sys) %dir /var/spool/cups/tmp
313
314 # Desktop files
315 /usr/share/applications/*
316 /usr/share/icons/*
317
318 %files devel
319 %defattr(-,root,root)
320 %dir /usr/share/man/man1
321 /usr/share/man/man1/cups-config.1.gz
322 /usr/share/man/man1/ppd*.1.gz
323 %dir /usr/share/man/man5
324 /usr/share/man/man5/ppdcfile.5.gz
325 /usr/share/man/man7/backend.7.gz
326 /usr/share/man/man7/filter.7.gz
327
328 /usr/bin/cups-config
329 /usr/bin/ppd*
330 %dir /usr/include/cups
331 /usr/include/cups/*
332 /usr/lib*/*.so
333
334 %if %{?_with_static:1}%{!?_with_static:0}
335 /usr/lib*/*.a
336 %endif
337
338 %dir /usr/share/doc/cups/help
339 /usr/share/doc/cups/help/api*.html
340 /usr/share/doc/cups/help/spec*.html
341
342 %files libs
343 %defattr(-,root,root)
344 /usr/lib*/*.so.*
345
346 %files lpd
347 %defattr(-,root,root)
348 /etc/xinetd.d/cups-lpd
349 %dir /usr/lib/cups
350 %dir /usr/lib/cups/daemon
351 /usr/lib/cups/daemon/cups-lpd
352 %dir /usr/share/man/man8
353 /usr/share/man/man8/cups-lpd.8.gz
354
355 %if %{?_with_php:1}%{!?_with_php:0}
356 %files php
357 # PHP
358 /usr/lib*/php*
359 %endif
360
361
362 #
363 # End of "$Id: cups.spec.in 7718 2008-07-10 23:04:22Z mike $".
364 #