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