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