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