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