]> git.ipfire.org Git - thirdparty/cups.git/blob - packaging/cups.spec.in
Load cups into easysw/current.
[thirdparty/cups.git] / packaging / cups.spec.in
1 #
2 # "$Id: cups.spec.in 6006 2006-10-02 17:56:40Z 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 1999-2006 by Easy Software Products, all rights reserved.
9 #
10 # These coded instructions, statements, and computer programs are the
11 # property of Easy Software Products and are protected by Federal
12 # copyright law. Distribution and use rights are outlined in the file
13 # "LICENSE.txt" which should have been included with this file. If this
14 # file is missing or damaged please contact Easy Software Products
15 # at:
16 #
17 # Attn: CUPS Licensing Information
18 # Easy Software Products
19 # 44141 Airport View Drive, Suite 204
20 # Hollywood, Maryland 20636 USA
21 #
22 # Voice: (301) 373-9600
23 # EMail: cups-info@cups.org
24 # WWW: http://www.cups.org
25 #
26
27 # Conditional build options (--with name/--without name):
28 #
29 # dbus - Enable/disable DBUS support (default = enable)
30 # php - Enable/disable PHP support (default = enable)
31
32 %{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
33 %{?_with_dbus: %define _dbus --enable-dbus}
34 %{!?_with_dbus: %define _dbus --disable-dbus}
35
36 %{!?_with_php: %{!?_without_php: %define _with_php --with-php}}
37 %{?_with_php: %define _php --with-php}
38 %{!?_with_php: %define _php --without-php}
39
40 %{!?_with_static: %{!?_without_static: %define _without_static --without-static}}
41 %{?_with_static: %define _static --enable-static}
42 %{!?_with_static: %define _static --disable-static}
43
44 Summary: Common UNIX Printing System
45 Name: cups
46 Version: @CUPS_VERSION@
47 Release: 0
48 Epoch: 1
49 License: GPL
50 Group: System Environment/Daemons
51 Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.gz
52 Url: http://www.cups.org
53 Packager: Anonymous <anonymous@foo.com>
54 Vendor: Easy Software Products
55
56 # Use buildroot so as not to disturb the version already installed
57 BuildRoot: /tmp/%{name}-root
58
59 # Dependencies...
60 Requires: %{name}-libs = %{epoch}:%{version}
61 Obsoletes: lpd, lpr, LPRng
62 Provides: lpd, lpr, LPRng
63
64 %package devel
65 Summary: Common UNIX Printing System - development environment
66 Group: Development/Libraries
67 Requires: %{name}-libs = %{epoch}:%{version}
68
69 %package libs
70 Summary: Common UNIX Printing System - shared libraries
71 Group: System Environment/Libraries
72 Provides: libcups1
73
74 %package lpd
75 Summary: Common UNIX Printing System - LPD support
76 Group: System Environment/Daemons
77 Requires: %{name} = %{epoch}:%{version} xinetd
78
79 %package de
80 Summary: Common UNIX Printing System - German support
81 Group: System Environment/Daemons
82 Requires: %{name} = %{epoch}:%{version}
83
84 %package es
85 Summary: Common UNIX Printing System - Spanish support
86 Group: System Environment/Daemons
87 Requires: %{name} = %{epoch}:%{version}
88
89 %package et
90 Summary: Common UNIX Printing System - Estonian support
91 Group: System Environment/Daemons
92 Requires: %{name} = %{epoch}:%{version}
93
94 %package ja
95 Summary: Common UNIX Printing System - Japanese support
96 Group: System Environment/Daemons
97 Requires: %{name} = %{epoch}:%{version}
98
99 %package pl
100 Summary: Common UNIX Printing System - Polish support
101 Group: System Environment/Daemons
102 Requires: %{name} = %{epoch}:%{version}
103
104 %package sv
105 Summary: Common UNIX Printing System - Swedish support
106 Group: System Environment/Daemons
107 Requires: %{name} = %{epoch}:%{version}
108
109 %if %{?_with_php:1}%{!?_with_php:0}
110 %package php
111 Summary: Common UNIX Printing System - PHP support
112 Group: Development/Languages
113 Requires: %{name}-libs = %{epoch}:%{version}
114 %endif
115
116 %description
117 The Common UNIX Printing System provides a portable printing layer for
118 UNIX® operating systems. It has been developed by Easy Software Products
119 to promote a standard printing solution for all UNIX vendors and users.
120 CUPS provides the System V and Berkeley command-line interfaces.
121
122 %description devel
123 The Common UNIX Printing System provides a portable printing layer for
124 UNIX® operating systems. This is the development package for creating
125 additional printer drivers and other CUPS services.
126
127 %description libs
128 The Common UNIX Printing System provides a portable printing layer for
129 UNIX® operating systems. This package contains the CUPS shared libraries.
130
131 %description lpd
132 The Common UNIX Printing System provides a portable printing layer for
133 UNIX® operating systems. This package provides LPD client support.
134
135 %description de
136 The Common UNIX Printing System provides a portable printing layer for
137 UNIX® operating systems. This package provides German support.
138
139 %description es
140 The Common UNIX Printing System provides a portable printing layer for
141 UNIX® operating systems. This package provides Spanish support.
142
143 %description et
144 The Common UNIX Printing System provides a portable printing layer for
145 UNIX® operating systems. This package provides Estonian support.
146
147 %description ja
148 The Common UNIX Printing System provides a portable printing layer for
149 UNIX® operating systems. This package provides Japanese support.
150
151 %description pl
152 The Common UNIX Printing System provides a portable printing layer for
153 UNIX® operating systems. This package provides Polish support.
154
155 %description sv
156 The Common UNIX Printing System provides a portable printing layer for
157 UNIX® operating systems. This package provides Swedish support.
158
159 %if %{?_with_php:1}%{!?_with_php:0}
160 %description php
161 The Common UNIX Printing System provides a portable printing layer for
162 UNIX® operating systems. This package provides PHP support.
163 %endif
164
165 %prep
166 %setup
167
168 %build
169 %ifarch x86_64
170 ./configure --enable-32bit %{_dbus} %{_php} %{_static}
171 %else
172 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
173 ./configure %{_dbus} %{_php} %{_static}
174 %endif
175 # If we got this far, all prerequisite libraries must be here.
176 make
177
178 %install
179 # Make sure the RPM_BUILD_ROOT directory exists.
180 rm -rf $RPM_BUILD_ROOT
181
182 make BUILDROOT=$RPM_BUILD_ROOT install
183
184 %post
185 /sbin/chkconfig --add cups
186 /sbin/chkconfig cups on
187
188 # Restart cupsd if we are upgrading...
189 if test $1 -gt 1; then
190 /sbin/service cups stop
191 /sbin/service cups start
192 fi
193
194 %post libs
195 /sbin/ldconfig
196
197 %preun
198 if test $1 = 0; then
199 /sbin/service cups stop
200 /sbin/chkconfig --del cups
201 fi
202
203 %postun
204 if test $1 -ge 1; then
205 /sbin/service cups stop
206 /sbin/service cups start
207 fi
208
209 %postun libs
210 /sbin/ldconfig
211
212 %clean
213 rm -rf $RPM_BUILD_ROOT
214
215 %files
216 %docdir /usr/share/doc/cups
217 %defattr(-,root,root)
218 %dir /etc/cups
219 %config(noreplace) /etc/cups/*.conf
220 /etc/cups/cupsd.conf.default
221 %dir /etc/cups/interfaces
222 /etc/cups/mime.types
223 /etc/cups/mime.convs
224 %dir /etc/cups/ppd
225 %attr(0700,root,root) %dir /etc/cups/ssl
226
227 %if %{?_with_dbus:1}%{!?_with_dbus:0}
228 # DBUS
229 /etc/dbus-1/system.d/*
230 %endif
231
232 # PAM
233 %dir /etc/pam.d
234 /etc/pam.d/*
235
236 # RC dirs are a pain under Linux... Uncomment the appropriate ones if you
237 # don't use Red Hat or Mandrake...
238
239 /etc/init.d/*
240 /etc/rc0.d/*
241 /etc/rc2.d/*
242 /etc/rc3.d/*
243 /etc/rc5.d/*
244
245 # OLD RedHat/Mandrake
246 #/etc/rc.d/init.d/*
247 #/etc/rc.d/rc0.d/*
248 #/etc/rc.d/rc2.d/*
249 #/etc/rc.d/rc3.d/*
250 #/etc/rc.d/rc5.d/*
251
252 #/sbin/rc.d/*
253 #/sbin/rc.d/rc0.d/*
254 #/sbin/rc.d/rc2.d/*
255 #/sbin/rc.d/rc3.d/*
256 #/sbin/rc.d/rc5.d/*
257
258 /usr/bin/cancel
259 /usr/bin/cupstestdsc
260 /usr/bin/cupstestppd
261 /usr/bin/lp*
262 %dir /usr/lib/cups
263 %dir /usr/lib/cups/backend
264 /usr/lib/cups/backend/http
265 /usr/lib/cups/backend/ipp
266 %attr(0700,root,root) /usr/lib/cups/backend/lpd
267 /usr/lib/cups/backend/parallel
268 /usr/lib/cups/backend/scsi
269 /usr/lib/cups/backend/serial
270 /usr/lib/cups/backend/snmp
271 /usr/lib/cups/backend/socket
272 /usr/lib/cups/backend/usb
273 %dir /usr/lib/cups/cgi-bin
274 /usr/lib/cups/cgi-bin/*
275 %dir /usr/lib/cups/daemon
276 /usr/lib/cups/daemon/cups-deviced
277 /usr/lib/cups/daemon/cups-driverd
278 /usr/lib/cups/daemon/cups-polld
279 %dir /usr/lib/cups/driver
280 %dir /usr/lib/cups/filter
281 /usr/lib/cups/filter/*
282 %dir /usr/lib/cups/monitor
283 /usr/lib/cups/monitor/*
284 %dir /usr/lib/cups/notifier
285 /usr/lib/cups/notifier/*
286
287 /usr/sbin/*
288 %dir /usr/share/cups
289 %dir /usr/share/cups/banners
290 /usr/share/cups/banners/*
291 %dir /usr/share/cups/charmaps
292 /usr/share/cups/charmaps/*
293 %dir /usr/share/cups/charsets
294 /usr/share/cups/charsets/*
295 %dir /usr/share/cups/data
296 /usr/share/cups/data/*
297 %dir /usr/share/cups/fonts
298 /usr/share/cups/fonts/*
299 %dir /usr/share/cups/model
300 /usr/share/cups/model/*
301 %dir /usr/share/cups/templates
302 /usr/share/cups/templates/*.tmpl
303 %dir /usr/share/doc/cups
304 /usr/share/doc/cups/*.*
305 %dir /usr/share/doc/cups/help
306 /usr/share/doc/cups/help/cgi.html
307 /usr/share/doc/cups/help/glossary.html
308 /usr/share/doc/cups/help/license.html
309 /usr/share/doc/cups/help/man-*.html
310 /usr/share/doc/cups/help/network.html
311 /usr/share/doc/cups/help/options.html
312 /usr/share/doc/cups/help/overview.html
313 /usr/share/doc/cups/help/policies.html
314 /usr/share/doc/cups/help/ref-*.html
315 /usr/share/doc/cups/help/security.html
316 /usr/share/doc/cups/help/standard.html
317 /usr/share/doc/cups/help/translation.html
318 /usr/share/doc/cups/help/whatsnew.html
319 %dir /usr/share/doc/cups/images
320 /usr/share/doc/cups/images/*
321
322 %dir /usr/share/man/man1
323 /usr/share/man/man1/cancel.1.gz
324 /usr/share/man/man1/cupstestdsc.1.gz
325 /usr/share/man/man1/cupstestppd.1.gz
326 /usr/share/man/man1/lp.1.gz
327 /usr/share/man/man1/lpoptions.1.gz
328 /usr/share/man/man1/lppasswd.1.gz
329 /usr/share/man/man1/lpq.1.gz
330 /usr/share/man/man1/lpr.1.gz
331 /usr/share/man/man1/lprm.1.gz
332 /usr/share/man/man1/lpstat.1.gz
333 %dir /usr/share/man/man5
334 /usr/share/man/man5/*
335 %dir /usr/share/man/man8
336 /usr/share/man/man8/accept.8.gz
337 /usr/share/man/man8/cupsaddsmb.8.gz
338 /usr/share/man/man8/cupsd.8.gz
339 /usr/share/man/man8/cupsdisable.8.gz
340 /usr/share/man/man8/cupsenable.8.gz
341 /usr/share/man/man8/cups-deviced.8.gz
342 /usr/share/man/man8/cups-driverd.8.gz
343 /usr/share/man/man8/cups-polld.8.gz
344 /usr/share/man/man8/lpadmin.8.gz
345 /usr/share/man/man8/lpc.8.gz
346 /usr/share/man/man8/lpinfo.8.gz
347 /usr/share/man/man8/lpmove.8.gz
348 /usr/share/man/man8/reject.8.gz
349
350 %dir /var/cache/cups
351 %dir /var/log/cups
352 %dir /var/run/cups
353 %attr(0711,lp,sys) %dir /var/run/cups/certs
354 %attr(0710,lp,sys) %dir /var/spool/cups
355 %attr(1770,lp,sys) %dir /var/spool/cups/tmp
356
357 # Desktop files
358 /usr/share/applications/*
359 /usr/share/icons/*
360
361 %files devel
362 %defattr(-,root,root)
363 %dir /usr/share/man/man1
364 /usr/share/man/man1/cups-config.1.gz
365 %dir /usr/share/man/man7
366 /usr/share/man/man7/*
367
368 /usr/bin/cups-config
369 %dir /usr/include/cups
370 /usr/include/cups/*
371 /usr/lib*/*.so
372
373 %if %{?_with_static:1}%{!?_with_static:0}
374 /usr/lib*/*.a
375 %endif
376
377 %dir /usr/share/doc/cups/help
378 /usr/share/doc/cups/help/api*.html
379 /usr/share/doc/cups/help/spec*.html
380
381 %files libs
382 %defattr(-,root,root)
383 /usr/lib*/*.so.*
384
385 %files lpd
386 %defattr(-,root,root)
387 /etc/xinetd.d/cups-lpd
388 %dir /usr/lib/cups
389 %dir /usr/lib/cups/daemon
390 /usr/lib/cups/daemon/cups-lpd
391 %dir /usr/share/man/man8
392 /usr/share/man/man8/cups-lpd.8.gz
393
394 %files de
395 %defattr(-,root,root)
396 %dir /usr/share/doc/cups/de
397 /usr/share/doc/cups/de/index.html
398 %dir /usr/share/doc/cups/de/images
399 /usr/share/doc/cups/de/images/*
400 %dir /usr/share/cups/templates/de
401 /usr/share/cups/templates/de/*
402 /usr/share/locale/de/cups_de.po
403
404 %files es
405 %defattr(-,root,root)
406 %dir /usr/share/doc/cups/es
407 /usr/share/doc/cups/es/index.html
408 %dir /usr/share/doc/cups/es/images
409 /usr/share/doc/cups/es/images/*
410 %dir /usr/share/cups/templates/es
411 /usr/share/cups/templates/es/*
412 /usr/share/locale/es/cups_es.po
413
414 %files et
415 %defattr(-,root,root)
416 %dir /usr/share/doc/cups/et
417 /usr/share/doc/cups/et/index.html
418 %dir /usr/share/doc/cups/et/images
419 /usr/share/doc/cups/et/images/*
420 %dir /usr/share/cups/templates/et
421 /usr/share/cups/templates/et/*
422 /usr/share/locale/et/cups_et.po
423
424 %files ja
425 %defattr(-,root,root)
426 %dir /usr/share/doc/cups/ja
427 /usr/share/doc/cups/ja/index.html
428 %dir /usr/share/doc/cups/ja/images
429 /usr/share/doc/cups/ja/images/*
430 %dir /usr/share/cups/templates/ja
431 /usr/share/cups/templates/ja/*
432 /usr/share/locale/ja/cups_ja.po
433
434 %files pl
435 %defattr(-,root,root)
436 %dir /usr/share/doc/cups/pl
437 /usr/share/doc/cups/pl/index.html
438 %dir /usr/share/doc/cups/pl/images
439 /usr/share/doc/cups/pl/images/*
440 %dir /usr/share/cups/templates/pl
441 /usr/share/cups/templates/pl/*
442 /usr/share/locale/pl/cups_pl.po
443
444 %files sv
445 %defattr(-,root,root)
446 %dir /usr/share/doc/cups/sv
447 /usr/share/doc/cups/sv/index.html
448 %dir /usr/share/doc/cups/sv/images
449 /usr/share/doc/cups/sv/images/*
450 %dir /usr/share/cups/templates/sv
451 /usr/share/cups/templates/sv/*
452 /usr/share/locale/sv/cups_sv.po
453
454 %if %{?_with_php:1}%{!?_with_php:0}
455 %files php
456 # PHP
457 /usr/lib*/php*
458 %endif
459
460
461 #
462 # End of "$Id: cups.spec.in 6006 2006-10-02 17:56:40Z mike $".
463 #