]> 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 6649 2007-07-11 21:46:42Z 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 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 %package de
71 Summary: Common UNIX Printing System - German support
72 Group: System Environment/Daemons
73 Requires: %{name} = %{epoch}:%{version}
74
75 %package es
76 Summary: Common UNIX Printing System - Spanish support
77 Group: System Environment/Daemons
78 Requires: %{name} = %{epoch}:%{version}
79
80 %package et
81 Summary: Common UNIX Printing System - Estonian support
82 Group: System Environment/Daemons
83 Requires: %{name} = %{epoch}:%{version}
84
85 %package fr
86 Summary: Common UNIX Printing System - French support
87 Group: System Environment/Daemons
88 Requires: %{name} = %{epoch}:%{version}
89
90 %package he
91 Summary: Common UNIX Printing System - Hebrew support
92 Group: System Environment/Daemons
93 Requires: %{name} = %{epoch}:%{version}
94
95 %package it
96 Summary: Common UNIX Printing System - Italian support
97 Group: System Environment/Daemons
98 Requires: %{name} = %{epoch}:%{version}
99
100 %package ja
101 Summary: Common UNIX Printing System - Japanese support
102 Group: System Environment/Daemons
103 Requires: %{name} = %{epoch}:%{version}
104
105 %package pl
106 Summary: Common UNIX Printing System - Polish support
107 Group: System Environment/Daemons
108 Requires: %{name} = %{epoch}:%{version}
109
110 %package sv
111 Summary: Common UNIX Printing System - Swedish support
112 Group: System Environment/Daemons
113 Requires: %{name} = %{epoch}:%{version}
114
115 %package zh
116 Summary: Common UNIX Printing System - Chinese support
117 Group: System Environment/Daemons
118 Requires: %{name} = %{epoch}:%{version}
119
120 %if %{?_with_php:1}%{!?_with_php:0}
121 %package php
122 Summary: Common UNIX Printing System - PHP support
123 Group: Development/Languages
124 Requires: %{name}-libs = %{epoch}:%{version}
125 %endif
126
127 %description
128 The Common UNIX Printing System provides a portable printing layer for
129 UNIX® operating systems. It was developed by Easy Software Products
130 to promote a standard printing solution for all UNIX vendors and users
131 and is now owned by Apple Inc. CUPS provides the System V and Berkeley
132 command-line interfaces.
133
134 %description devel
135 The Common UNIX Printing System provides a portable printing layer for
136 UNIX® operating systems. This is the development package for creating
137 additional printer drivers and other CUPS services.
138
139 %description libs
140 The Common UNIX Printing System provides a portable printing layer for
141 UNIX® operating systems. This package contains the CUPS shared libraries.
142
143 %description lpd
144 The Common UNIX Printing System provides a portable printing layer for
145 UNIX® operating systems. This package provides LPD client support.
146
147 %description de
148 The Common UNIX Printing System provides a portable printing layer for
149 UNIX® operating systems. This package provides German support.
150
151 %description es
152 The Common UNIX Printing System provides a portable printing layer for
153 UNIX® operating systems. This package provides Spanish support.
154
155 %description et
156 The Common UNIX Printing System provides a portable printing layer for
157 UNIX® operating systems. This package provides Estonian support.
158
159 %description fr
160 The Common UNIX Printing System provides a portable printing layer for
161 UNIX® operating systems. This package provides French support.
162
163 %description he
164 The Common UNIX Printing System provides a portable printing layer for
165 UNIX® operating systems. This package provides Hebrew support.
166
167 %description it
168 The Common UNIX Printing System provides a portable printing layer for
169 UNIX® operating systems. This package provides Italian support.
170
171 %description ja
172 The Common UNIX Printing System provides a portable printing layer for
173 UNIX® operating systems. This package provides Japanese support.
174
175 %description pl
176 The Common UNIX Printing System provides a portable printing layer for
177 UNIX® operating systems. This package provides Polish support.
178
179 %description sv
180 The Common UNIX Printing System provides a portable printing layer for
181 UNIX® operating systems. This package provides Swedish support.
182
183 %description zh
184 The Common UNIX Printing System provides a portable printing layer for
185 UNIX® operating systems. This package provides Chinese support.
186
187 %if %{?_with_php:1}%{!?_with_php:0}
188 %description php
189 The Common UNIX Printing System provides a portable printing layer for
190 UNIX® operating systems. This package provides PHP support.
191 %endif
192
193 %prep
194 %setup
195
196 %build
197 %ifarch x86_64
198 ./configure --enable-32bit %{_dbus} %{_php} %{_static}
199 %else
200 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
201 ./configure %{_dbus} %{_php} %{_static}
202 %endif
203 # If we got this far, all prerequisite libraries must be here.
204 make
205
206 %install
207 # Make sure the RPM_BUILD_ROOT directory exists.
208 rm -rf $RPM_BUILD_ROOT
209
210 make BUILDROOT=$RPM_BUILD_ROOT install
211
212 %post
213 /sbin/chkconfig --add cups
214 /sbin/chkconfig cups on
215
216 # Restart cupsd if we are upgrading...
217 if test $1 -gt 1; then
218 /sbin/service cups stop
219 /sbin/service cups start
220 fi
221
222 %post libs
223 /sbin/ldconfig
224
225 %preun
226 if test $1 = 0; then
227 /sbin/service cups stop
228 /sbin/chkconfig --del cups
229 fi
230
231 %postun
232 if test $1 -ge 1; then
233 /sbin/service cups stop
234 /sbin/service cups start
235 fi
236
237 %postun libs
238 /sbin/ldconfig
239
240 %clean
241 rm -rf $RPM_BUILD_ROOT
242
243 %files
244 %docdir /usr/share/doc/cups
245 %defattr(-,root,root)
246 %dir /etc/cups
247 %config(noreplace) /etc/cups/*.conf
248 /etc/cups/cupsd.conf.default
249 %dir /etc/cups/interfaces
250 /etc/cups/mime.types
251 /etc/cups/mime.convs
252 %dir /etc/cups/ppd
253 %attr(0700,root,root) %dir /etc/cups/ssl
254
255 %if %{?_with_dbus:1}%{!?_with_dbus:0}
256 # DBUS
257 /etc/dbus-1/system.d/*
258 %endif
259
260 # PAM
261 %dir /etc/pam.d
262 /etc/pam.d/*
263
264 # RC dirs are a pain under Linux... Uncomment the appropriate ones if you
265 # don't use Red Hat or Mandrake...
266
267 /etc/init.d/*
268 /etc/rc0.d/*
269 /etc/rc2.d/*
270 /etc/rc3.d/*
271 /etc/rc5.d/*
272
273 # OLD RedHat/Mandrake
274 #/etc/rc.d/init.d/*
275 #/etc/rc.d/rc0.d/*
276 #/etc/rc.d/rc2.d/*
277 #/etc/rc.d/rc3.d/*
278 #/etc/rc.d/rc5.d/*
279
280 #/sbin/rc.d/*
281 #/sbin/rc.d/rc0.d/*
282 #/sbin/rc.d/rc2.d/*
283 #/sbin/rc.d/rc3.d/*
284 #/sbin/rc.d/rc5.d/*
285
286 /usr/bin/cancel
287 /usr/bin/cupstestdsc
288 /usr/bin/cupstestppd
289 /usr/bin/lp*
290 %dir /usr/lib/cups
291 %dir /usr/lib/cups/backend
292 /usr/lib/cups/backend/http
293 /usr/lib/cups/backend/ipp
294 %attr(0700,root,root) /usr/lib/cups/backend/lpd
295 /usr/lib/cups/backend/parallel
296 /usr/lib/cups/backend/scsi
297 /usr/lib/cups/backend/serial
298 /usr/lib/cups/backend/snmp
299 /usr/lib/cups/backend/socket
300 /usr/lib/cups/backend/usb
301 %dir /usr/lib/cups/cgi-bin
302 /usr/lib/cups/cgi-bin/*
303 %dir /usr/lib/cups/daemon
304 /usr/lib/cups/daemon/cups-deviced
305 /usr/lib/cups/daemon/cups-driverd
306 /usr/lib/cups/daemon/cups-polld
307 %dir /usr/lib/cups/driver
308 %dir /usr/lib/cups/filter
309 /usr/lib/cups/filter/*
310 %dir /usr/lib/cups/monitor
311 /usr/lib/cups/monitor/*
312 %dir /usr/lib/cups/notifier
313 /usr/lib/cups/notifier/*
314
315 /usr/sbin/*
316 %dir /usr/share/cups
317 %dir /usr/share/cups/banners
318 /usr/share/cups/banners/*
319 %dir /usr/share/cups/charmaps
320 /usr/share/cups/charmaps/*
321 %dir /usr/share/cups/charsets
322 /usr/share/cups/charsets/*
323 %dir /usr/share/cups/data
324 /usr/share/cups/data/*
325 %dir /usr/share/cups/fonts
326 /usr/share/cups/fonts/*
327 %dir /usr/share/cups/model
328 /usr/share/cups/model/*
329 %dir /usr/share/cups/templates
330 /usr/share/cups/templates/*.tmpl
331 %dir /usr/share/doc/cups
332 /usr/share/doc/cups/*.*
333 %dir /usr/share/doc/cups/help
334 /usr/share/doc/cups/help/accounting.html
335 /usr/share/doc/cups/help/cgi.html
336 /usr/share/doc/cups/help/glossary.html
337 /usr/share/doc/cups/help/license.html
338 /usr/share/doc/cups/help/man-*.html
339 /usr/share/doc/cups/help/network.html
340 /usr/share/doc/cups/help/options.html
341 /usr/share/doc/cups/help/overview.html
342 /usr/share/doc/cups/help/policies.html
343 /usr/share/doc/cups/help/ref-*.html
344 /usr/share/doc/cups/help/security.html
345 /usr/share/doc/cups/help/standard.html
346 /usr/share/doc/cups/help/translation.html
347 /usr/share/doc/cups/help/whatsnew.html
348 %dir /usr/share/doc/cups/images
349 /usr/share/doc/cups/images/*
350
351 %dir /usr/share/man/man1
352 /usr/share/man/man1/cancel.1.gz
353 /usr/share/man/man1/cupstestdsc.1.gz
354 /usr/share/man/man1/cupstestppd.1.gz
355 /usr/share/man/man1/lp.1.gz
356 /usr/share/man/man1/lpoptions.1.gz
357 /usr/share/man/man1/lppasswd.1.gz
358 /usr/share/man/man1/lpq.1.gz
359 /usr/share/man/man1/lpr.1.gz
360 /usr/share/man/man1/lprm.1.gz
361 /usr/share/man/man1/lpstat.1.gz
362 %dir /usr/share/man/man5
363 /usr/share/man/man5/*
364 %dir /usr/share/man/man8
365 /usr/share/man/man8/accept.8.gz
366 /usr/share/man/man8/cupsaddsmb.8.gz
367 /usr/share/man/man8/cupsctl.8.gz
368 /usr/share/man/man8/cupsd.8.gz
369 /usr/share/man/man8/cupsdisable.8.gz
370 /usr/share/man/man8/cupsenable.8.gz
371 /usr/share/man/man8/cups-deviced.8.gz
372 /usr/share/man/man8/cups-driverd.8.gz
373 /usr/share/man/man8/cups-polld.8.gz
374 /usr/share/man/man8/lpadmin.8.gz
375 /usr/share/man/man8/lpc.8.gz
376 /usr/share/man/man8/lpinfo.8.gz
377 /usr/share/man/man8/lpmove.8.gz
378 /usr/share/man/man8/reject.8.gz
379
380 %dir /var/cache/cups
381 %attr(0775,root,sys) %dir /var/cache/cups/rss
382 %dir /var/log/cups
383 %dir /var/run/cups
384 %attr(0711,lp,sys) %dir /var/run/cups/certs
385 %attr(0710,lp,sys) %dir /var/spool/cups
386 %attr(1770,lp,sys) %dir /var/spool/cups/tmp
387
388 # Desktop files
389 /usr/share/applications/*
390 /usr/share/icons/*
391
392 %files devel
393 %defattr(-,root,root)
394 %dir /usr/share/man/man1
395 /usr/share/man/man1/cups-config.1.gz
396 %dir /usr/share/man/man7
397 /usr/share/man/man7/*
398
399 /usr/bin/cups-config
400 %dir /usr/include/cups
401 /usr/include/cups/*
402 /usr/lib*/*.so
403
404 %if %{?_with_static:1}%{!?_with_static:0}
405 /usr/lib*/*.a
406 %endif
407
408 %dir /usr/share/doc/cups/help
409 /usr/share/doc/cups/help/api*.html
410 /usr/share/doc/cups/help/spec*.html
411
412 %files libs
413 %defattr(-,root,root)
414 /usr/lib*/*.so.*
415
416 %files lpd
417 %defattr(-,root,root)
418 /etc/xinetd.d/cups-lpd
419 %dir /usr/lib/cups
420 %dir /usr/lib/cups/daemon
421 /usr/lib/cups/daemon/cups-lpd
422 %dir /usr/share/man/man8
423 /usr/share/man/man8/cups-lpd.8.gz
424
425 %files de
426 %defattr(-,root,root)
427 %dir /usr/share/doc/cups/de
428 /usr/share/doc/cups/de/index.html
429 %dir /usr/share/doc/cups/de/images
430 /usr/share/doc/cups/de/images/*
431 %dir /usr/share/cups/templates/de
432 /usr/share/cups/templates/de/*
433 /usr/share/locale/de/cups_de.po
434
435 %files es
436 %defattr(-,root,root)
437 %dir /usr/share/doc/cups/es
438 /usr/share/doc/cups/es/index.html
439 %dir /usr/share/doc/cups/es/images
440 /usr/share/doc/cups/es/images/*
441 %dir /usr/share/cups/templates/es
442 /usr/share/cups/templates/es/*
443 /usr/share/locale/es/cups_es.po
444
445 %files et
446 %defattr(-,root,root)
447 %dir /usr/share/doc/cups/et
448 /usr/share/doc/cups/et/index.html
449 %dir /usr/share/doc/cups/et/images
450 /usr/share/doc/cups/et/images/*
451 %dir /usr/share/cups/templates/et
452 /usr/share/cups/templates/et/*
453 /usr/share/locale/et/cups_et.po
454
455 %files fr
456 %defattr(-,root,root)
457 %dir /usr/share/doc/cups/fr
458 /usr/share/doc/cups/fr/index.html
459 %dir /usr/share/doc/cups/fr/images
460 /usr/share/doc/cups/fr/images/*
461 %dir /usr/share/cups/templates/fr
462 /usr/share/cups/templates/fr/*
463 /usr/share/locale/fr/cups_fr.po
464
465 %files he
466 %defattr(-,root,root)
467 %dir /usr/share/doc/cups/he
468 /usr/share/doc/cups/he/index.html
469 /usr/share/doc/cups/he/cups.css
470 %dir /usr/share/doc/cups/he/images
471 /usr/share/doc/cups/he/images/*
472 %dir /usr/share/cups/templates/he
473 /usr/share/cups/templates/he/*
474 /usr/share/locale/he/cups_he.po
475
476 %files it
477 %defattr(-,root,root)
478 %dir /usr/share/doc/cups/it
479 /usr/share/doc/cups/it/index.html
480 %dir /usr/share/doc/cups/it/images
481 /usr/share/doc/cups/it/images/*
482 %dir /usr/share/cups/templates/it
483 /usr/share/cups/templates/it/*
484 /usr/share/locale/it/cups_it.po
485
486 %files ja
487 %defattr(-,root,root)
488 %dir /usr/share/doc/cups/ja
489 /usr/share/doc/cups/ja/index.html
490 %dir /usr/share/doc/cups/ja/images
491 /usr/share/doc/cups/ja/images/*
492 %dir /usr/share/cups/templates/ja
493 /usr/share/cups/templates/ja/*
494 /usr/share/locale/ja/cups_ja.po
495
496 %files pl
497 %defattr(-,root,root)
498 %dir /usr/share/doc/cups/pl
499 /usr/share/doc/cups/pl/index.html
500 %dir /usr/share/doc/cups/pl/images
501 /usr/share/doc/cups/pl/images/*
502 %dir /usr/share/cups/templates/pl
503 /usr/share/cups/templates/pl/*
504 /usr/share/locale/pl/cups_pl.po
505
506 %files sv
507 %defattr(-,root,root)
508 %dir /usr/share/doc/cups/sv
509 /usr/share/doc/cups/sv/index.html
510 %dir /usr/share/doc/cups/sv/images
511 /usr/share/doc/cups/sv/images/*
512 %dir /usr/share/cups/templates/sv
513 /usr/share/cups/templates/sv/*
514 /usr/share/locale/sv/cups_sv.po
515
516 %files zh
517 %defattr(-,root,root)
518 %dir /usr/share/doc/cups/zh_TW
519 /usr/share/doc/cups/zh_TW/index.html
520 %dir /usr/share/doc/cups/zh_TW/images
521 /usr/share/doc/cups/zh_TW/images/*
522 %dir /usr/share/cups/templates/zh_TW
523 /usr/share/cups/templates/zh_TW/*
524 /usr/share/locale/zh_TW/cups_zh_TW.po
525
526 %if %{?_with_php:1}%{!?_with_php:0}
527 %files php
528 # PHP
529 /usr/lib*/php*
530 %endif
531
532
533 #
534 # End of "$Id: cups.spec.in 6649 2007-07-11 21:46:42Z mike $".
535 #