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