]> git.ipfire.org Git - thirdparty/cups.git/blob - packaging/cups.spec.in
Merge CUPS 1.4svn-r7493.
[thirdparty/cups.git] / packaging / cups.spec.in
1 #
2 # "$Id: cups.spec.in 6889 2007-08-29 22:23:35Z 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
55 %package devel
56 Summary: Common UNIX Printing System - development environment
57 Group: Development/Libraries
58 Requires: %{name}-libs = %{epoch}:%{version}
59
60 %package libs
61 Summary: Common UNIX Printing System - shared libraries
62 Group: System Environment/Libraries
63 Provides: libcups1
64
65 %package lpd
66 Summary: Common UNIX Printing System - LPD support
67 Group: System Environment/Daemons
68 Requires: %{name} = %{epoch}:%{version} xinetd
69
70 %if %{?_with_php:1}%{!?_with_php:0}
71 %package php
72 Summary: Common UNIX Printing System - PHP support
73 Group: Development/Languages
74 Requires: %{name}-libs = %{epoch}:%{version}
75 %endif
76
77 %description
78 The Common UNIX Printing System provides a portable printing layer for
79 UNIX® operating systems. It was developed by Easy Software Products
80 to promote a standard printing solution for all UNIX vendors and users
81 and is now owned by Apple Inc. CUPS provides the System V and Berkeley
82 command-line interfaces.
83
84 %description devel
85 The Common UNIX Printing System provides a portable printing layer for
86 UNIX® operating systems. This is the development package for creating
87 additional printer drivers and other CUPS services.
88
89 %description libs
90 The Common UNIX Printing System provides a portable printing layer for
91 UNIX® operating systems. This package contains the CUPS shared libraries.
92
93 %description lpd
94 The Common UNIX Printing System provides a portable printing layer for
95 UNIX® operating systems. This package provides LPD client support.
96
97 %description da
98 The Common UNIX Printing System provides a portable printing layer for
99 UNIX® operating systems. This package provides Danish support.
100
101 %description de
102 The Common UNIX Printing System provides a portable printing layer for
103 UNIX® operating systems. This package provides German support.
104
105 %description es
106 The Common UNIX Printing System provides a portable printing layer for
107 UNIX® operating systems. This package provides Spanish support.
108
109 %description et
110 The Common UNIX Printing System provides a portable printing layer for
111 UNIX® operating systems. This package provides Estonian support.
112
113 %description fi
114 The Common UNIX Printing System provides a portable printing layer for
115 UNIX® operating systems. This package provides Finnish support.
116
117 %description fr
118 The Common UNIX Printing System provides a portable printing layer for
119 UNIX® operating systems. This package provides French support.
120
121 %description he
122 The Common UNIX Printing System provides a portable printing layer for
123 UNIX® operating systems. This package provides Hebrew support.
124
125 %description it
126 The Common UNIX Printing System provides a portable printing layer for
127 UNIX® operating systems. This package provides Italian support.
128
129 %description ja
130 The Common UNIX Printing System provides a portable printing layer for
131 UNIX® operating systems. This package provides Japanese support.
132
133 %description ko
134 The Common UNIX Printing System provides a portable printing layer for
135 UNIX® operating systems. This package provides Korean support.
136
137 %description nl
138 The Common UNIX Printing System provides a portable printing layer for
139 UNIX® operating systems. This package provides Dutch support.
140
141 %description no
142 The Common UNIX Printing System provides a portable printing layer for
143 UNIX® operating systems. This package provides Norwegian support.
144
145 %description pl
146 The Common UNIX Printing System provides a portable printing layer for
147 UNIX® operating systems. This package provides Polish support.
148
149 %description pt
150 The Common UNIX Printing System provides a portable printing layer for
151 UNIX® operating systems. This package provides Portuguese support.
152
153 %description ru
154 The Common UNIX Printing System provides a portable printing layer for
155 UNIX® operating systems. This package provides Russian support.
156
157 %description sv
158 The Common UNIX Printing System provides a portable printing layer for
159 UNIX® operating systems. This package provides Swedish support.
160
161 %description zh
162 The Common UNIX Printing System provides a portable printing layer for
163 UNIX® operating systems. This package provides Chinese support.
164
165 %if %{?_with_php:1}%{!?_with_php:0}
166 %description php
167 The Common UNIX Printing System provides a portable printing layer for
168 UNIX® operating systems. This package provides PHP support.
169 %endif
170
171 %prep
172 %setup
173
174 %build
175 %ifarch x86_64
176 ./configure --enable-32bit %{_dbus} %{_php} %{_static}
177 %else
178 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
179 ./configure %{_dbus} %{_php} %{_static}
180 %endif
181 # If we got this far, all prerequisite libraries must be here.
182 make
183
184 %install
185 # Make sure the RPM_BUILD_ROOT directory exists.
186 rm -rf $RPM_BUILD_ROOT
187
188 make BUILDROOT=$RPM_BUILD_ROOT install
189
190 %post
191 /sbin/chkconfig --add cups
192 /sbin/chkconfig cups on
193
194 # Restart cupsd if we are upgrading...
195 if test $1 -gt 1; then
196 /sbin/service cups stop
197 /sbin/service cups start
198 fi
199
200 %post libs
201 /sbin/ldconfig
202
203 %preun
204 if test $1 = 0; then
205 /sbin/service cups stop
206 /sbin/chkconfig --del cups
207 fi
208
209 %postun
210 if test $1 -ge 1; then
211 /sbin/service cups stop
212 /sbin/service cups start
213 fi
214
215 %postun libs
216 /sbin/ldconfig
217
218 %clean
219 rm -rf $RPM_BUILD_ROOT
220
221 %files
222 %docdir /usr/share/doc/cups
223 %defattr(-,root,root)
224 %dir /etc/cups
225 %config(noreplace) /etc/cups/*.conf
226 /etc/cups/cupsd.conf.default
227 %dir /etc/cups/interfaces
228 /etc/cups/mime.types
229 /etc/cups/mime.convs
230 %dir /etc/cups/ppd
231 %attr(0700,root,root) %dir /etc/cups/ssl
232
233 %if %{?_with_dbus:1}%{!?_with_dbus:0}
234 # DBUS
235 /etc/dbus-1/system.d/*
236 %endif
237
238 # PAM
239 %dir /etc/pam.d
240 /etc/pam.d/*
241
242 # RC dirs are a pain under Linux... Uncomment the appropriate ones if you
243 # don't use Red Hat or Mandrake...
244
245 /etc/init.d/*
246 /etc/rc0.d/*
247 /etc/rc2.d/*
248 /etc/rc3.d/*
249 /etc/rc5.d/*
250
251 # OLD RedHat/Mandrake
252 #/etc/rc.d/init.d/*
253 #/etc/rc.d/rc0.d/*
254 #/etc/rc.d/rc2.d/*
255 #/etc/rc.d/rc3.d/*
256 #/etc/rc.d/rc5.d/*
257
258 #/sbin/rc.d/*
259 #/sbin/rc.d/rc0.d/*
260 #/sbin/rc.d/rc2.d/*
261 #/sbin/rc.d/rc3.d/*
262 #/sbin/rc.d/rc5.d/*
263
264 /usr/bin/cancel
265 /usr/bin/cupstestdsc
266 /usr/bin/cupstestppd
267 /usr/bin/lp*
268 %dir /usr/lib/cups
269 %dir /usr/lib/cups/backend
270 /usr/lib/cups/backend/http
271 %attr(0700,root,root) /usr/lib/cups/backend/ipp
272 %attr(0700,root,root) /usr/lib/cups/backend/lpd
273 /usr/lib/cups/backend/parallel
274 /usr/lib/cups/backend/scsi
275 /usr/lib/cups/backend/serial
276 /usr/lib/cups/backend/snmp
277 /usr/lib/cups/backend/socket
278 /usr/lib/cups/backend/usb
279 %dir /usr/lib/cups/cgi-bin
280 /usr/lib/cups/cgi-bin/*
281 %dir /usr/lib/cups/daemon
282 /usr/lib/cups/daemon/cups-deviced
283 /usr/lib/cups/daemon/cups-driverd
284 /usr/lib/cups/daemon/cups-polld
285 %dir /usr/lib/cups/driver
286 /usr/lib/cups/driver/drv
287 %dir /usr/lib/cups/filter
288 /usr/lib/cups/filter/*
289 %dir /usr/lib/cups/monitor
290 /usr/lib/cups/monitor/*
291 %dir /usr/lib/cups/notifier
292 /usr/lib/cups/notifier/*
293
294 /usr/sbin/*
295 %dir /usr/share/cups
296 %dir /usr/share/cups/banners
297 /usr/share/cups/banners/*
298 %dir /usr/share/cups/charmaps
299 /usr/share/cups/charmaps/*
300 %dir /usr/share/cups/charsets
301 /usr/share/cups/charsets/*
302 %dir /usr/share/cups/data
303 /usr/share/cups/data/*
304 %dir /usr/share/cups/drv
305 /usr/share/cups/drv/*
306 %dir /usr/share/cups/fonts
307 /usr/share/cups/fonts/*
308 %dir /usr/share/cups/model
309 %dir /usr/share/cups/ppdc
310 /usr/share/cups/ppdc/*
311 %dir /usr/share/cups/templates
312 /usr/share/cups/templates/*
313 %dir /usr/share/doc/cups
314 /usr/share/doc/cups/*.*
315 %dir /usr/share/doc/cups/help
316 /usr/share/doc/cups/help/accounting.html
317 /usr/share/doc/cups/help/cgi.html
318 /usr/share/doc/cups/help/glossary.html
319 /usr/share/doc/cups/help/kerberos.html
320 /usr/share/doc/cups/help/license.html
321 /usr/share/doc/cups/help/man-*.html
322 /usr/share/doc/cups/help/network.html
323 /usr/share/doc/cups/help/options.html
324 /usr/share/doc/cups/help/overview.html
325 /usr/share/doc/cups/help/policies.html
326 /usr/share/doc/cups/help/ref-*.html
327 /usr/share/doc/cups/help/security.html
328 /usr/share/doc/cups/help/standard.html
329 /usr/share/doc/cups/help/translation.html
330 /usr/share/doc/cups/help/whatsnew.html
331 %dir /usr/share/doc/cups/images
332 /usr/share/doc/cups/images/*
333 /usr/share/locale/*
334
335 %dir /usr/share/man/man1
336 /usr/share/man/man1/cancel.1.gz
337 /usr/share/man/man1/cupstestdsc.1.gz
338 /usr/share/man/man1/cupstestppd.1.gz
339 /usr/share/man/man1/lp.1.gz
340 /usr/share/man/man1/lpoptions.1.gz
341 /usr/share/man/man1/lppasswd.1.gz
342 /usr/share/man/man1/lpq.1.gz
343 /usr/share/man/man1/lpr.1.gz
344 /usr/share/man/man1/lprm.1.gz
345 /usr/share/man/man1/lpstat.1.gz
346 %dir /usr/share/man/man5
347 /usr/share/man/man5/*.conf.5.gz
348 /usr/share/man/man5/mime.*.5.gz
349 %dir /usr/share/man/man7
350 /usr/share/man/man7/commandto*
351 /usr/share/man/man7/rasterto*
352 %dir /usr/share/man/man8
353 /usr/share/man/man8/accept.8.gz
354 /usr/share/man/man8/cupsaddsmb.8.gz
355 /usr/share/man/man8/cupsctl.8.gz
356 /usr/share/man/man8/cupsfilter.8.gz
357 /usr/share/man/man8/cupsd.8.gz
358 /usr/share/man/man8/cupsdisable.8.gz
359 /usr/share/man/man8/cupsenable.8.gz
360 /usr/share/man/man8/cups-deviced.8.gz
361 /usr/share/man/man8/cups-driverd.8.gz
362 /usr/share/man/man8/cups-polld.8.gz
363 /usr/share/man/man8/lpadmin.8.gz
364 /usr/share/man/man8/lpc.8.gz
365 /usr/share/man/man8/lpinfo.8.gz
366 /usr/share/man/man8/lpmove.8.gz
367 /usr/share/man/man8/reject.8.gz
368
369 %dir /var/cache/cups
370 %attr(0775,root,sys) %dir /var/cache/cups/rss
371 %dir /var/log/cups
372 %dir /var/run/cups
373 %attr(0711,lp,sys) %dir /var/run/cups/certs
374 %attr(0710,lp,sys) %dir /var/spool/cups
375 %attr(1770,lp,sys) %dir /var/spool/cups/tmp
376
377 # Desktop files
378 /usr/share/applications/*
379 /usr/share/icons/*
380
381 %files devel
382 %defattr(-,root,root)
383 %dir /usr/share/man/man1
384 /usr/share/man/man1/cups-config.1.gz
385 /usr/share/man/man1/ppd*.1.gz
386 %dir /usr/share/man/man5
387 /usr/share/man/man5/ppdcfile.5.gz
388 /usr/share/man/man7/backend.7.gz
389 /usr/share/man/man7/filter.7.gz
390
391 /usr/bin/cups-config
392 /usr/bin/ppd*
393 %dir /usr/include/cups
394 /usr/include/cups/*
395 /usr/lib*/*.so
396
397 %if %{?_with_static:1}%{!?_with_static:0}
398 /usr/lib*/*.a
399 %endif
400
401 %dir /usr/share/doc/cups/help
402 /usr/share/doc/cups/help/api*.html
403 /usr/share/doc/cups/help/spec*.html
404
405 %files libs
406 %defattr(-,root,root)
407 /usr/lib*/*.so.*
408
409 %files lpd
410 %defattr(-,root,root)
411 /etc/xinetd.d/cups-lpd
412 %dir /usr/lib/cups
413 %dir /usr/lib/cups/daemon
414 /usr/lib/cups/daemon/cups-lpd
415 %dir /usr/share/man/man8
416 /usr/share/man/man8/cups-lpd.8.gz
417
418 %if %{?_with_php:1}%{!?_with_php:0}
419 %files php
420 # PHP
421 /usr/lib*/php*
422 %endif
423
424
425 #
426 # End of "$Id: cups.spec.in 6889 2007-08-29 22:23:35Z mike $".
427 #