]> 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 5224 2006-03-04 02:00:43Z 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
38 Summary: Common UNIX Printing System
39 Name: cups
40 Version: @CUPS_VERSION@
41 Release: 0
42 Epoch: 1
43 License: GPL
44 Group: System Environment/Daemons
45 Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.gz
46 Url: http://www.cups.org
47 Packager: Anonymous <anonymous@foo.com>
48 Vendor: Easy Software Products
49
50 # Use buildroot so as not to disturb the version already installed
51 BuildRoot: /tmp/%{name}-root
52
53 # Dependencies...
54 Requires: %{name}-libs = %{epoch}:%{version}
55 Obsoletes: lpd, lpr, LPRng
56 Provides: lpd, lpr, LPRng
57
58 %package devel
59 Summary: Common UNIX Printing System - development environment
60 Group: Development/Libraries
61 Requires: %{name}-libs = %{epoch}:%{version}
62
63 %package libs
64 Summary: Common UNIX Printing System - shared libraries
65 Group: System Environment/Libraries
66 Provides: libcups1
67
68 %package lpd
69 Summary: Common UNIX Printing System - LPD support
70 Group: System Environment/Daemons
71 Requires: %{name} = %{epoch}:%{version} xinetd
72
73 %package ja
74 Summary: Common UNIX Printing System - Japanese support
75 Group: System Environment/Daemons
76 Requires: %{name} = %{epoch}:%{version}
77
78 %if %{?_with_php:1}%{!?_with_php:0}
79 %package php
80 Summary: Common UNIX Printing System - PHP support
81 Group: Development/Languages
82 Requires: %{name}-libs = %{epoch}:%{version}
83 %endif
84
85 %description
86 The Common UNIX Printing System provides a portable printing layer for
87 UNIX® operating systems. It has been developed by Easy Software Products
88 to promote a standard printing solution for all UNIX vendors and users.
89 CUPS provides the System V and Berkeley command-line interfaces.
90
91 %description devel
92 The Common UNIX Printing System provides a portable printing layer for
93 UNIX® operating systems. This is the development package for creating
94 additional printer drivers and other CUPS services.
95
96 %description libs
97 The Common UNIX Printing System provides a portable printing layer for
98 UNIX® operating systems. This package contains the CUPS shared libraries.
99
100 %description lpd
101 The Common UNIX Printing System provides a portable printing layer for
102 UNIX® operating systems. This package provides LPD client support.
103
104 %description ja
105 The Common UNIX Printing System provides a portable printing layer for
106 UNIX® operating systems. This package provides Japanese support.
107
108 %if %{?_with_php:1}%{!?_with_php:0}
109 %description php
110 The Common UNIX Printing System provides a portable printing layer for
111 UNIX® operating systems. This package provides PHP support.
112 %endif
113
114 %prep
115 %setup
116
117 %build
118 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" ./configure %{_dbus} %{_without_php}
119
120 # If we got this far, all prerequisite libraries must be here.
121 make
122
123 %install
124 # Make sure the RPM_BUILD_ROOT directory exists.
125 rm -rf $RPM_BUILD_ROOT
126
127 make BUILDROOT=$RPM_BUILD_ROOT install
128
129 %post
130 /sbin/chkconfig --add cups
131 /sbin/chkconfig cups on
132
133 # Restart cupsd if we are upgrading...
134 if test $1 -gt 1; then
135 /sbin/service cups stop
136 /sbin/service cups start
137 fi
138
139 %post libs
140 /sbin/ldconfig
141
142 %preun
143 if test $1 = 0; then
144 /sbin/service cups stop
145 /sbin/chkconfig --del cups
146 fi
147
148 %postun
149 if test $1 -ge 1; then
150 /sbin/service cups stop
151 /sbin/service cups start
152 fi
153
154 %postun libs
155 /sbin/ldconfig
156
157 %clean
158 rm -rf $RPM_BUILD_ROOT
159
160 %files
161 %docdir /usr/share/doc/cups
162 %defattr(-,root,root)
163 %dir /etc/cups
164 %config(noreplace) /etc/cups/*.conf
165 /etc/cups/cupsd.conf.default
166 %dir /etc/cups/interfaces
167 /etc/cups/mime.types
168 /etc/cups/mime.convs
169 %dir /etc/cups/ppd
170
171 %if %{?_with_dbus:1}%{!?_with_dbus:0}
172 # DBUS
173 /etc/dbus-1/system.d/*
174 %endif
175
176 # PAM
177 %dir /etc/pam.d
178 /etc/pam.d/*
179
180 # RC dirs are a pain under Linux... Uncomment the appropriate ones if you
181 # don't use Red Hat or Mandrake...
182
183 /etc/init.d/*
184 /etc/rc0.d/*
185 /etc/rc2.d/*
186 /etc/rc3.d/*
187 /etc/rc5.d/*
188
189 # OLD RedHat/Mandrake
190 #/etc/rc.d/init.d/*
191 #/etc/rc.d/rc0.d/*
192 #/etc/rc.d/rc2.d/*
193 #/etc/rc.d/rc3.d/*
194 #/etc/rc.d/rc5.d/*
195
196 #/sbin/rc.d/*
197 #/sbin/rc.d/rc0.d/*
198 #/sbin/rc.d/rc2.d/*
199 #/sbin/rc.d/rc3.d/*
200 #/sbin/rc.d/rc5.d/*
201
202 /usr/bin/cancel
203 /usr/bin/cupstestppd
204 /usr/bin/lp*
205 %dir /usr/lib/cups
206 %dir /usr/lib/cups/backend
207 /usr/lib/cups/backend/http
208 /usr/lib/cups/backend/ipp
209 %attr(0700,root,root) /usr/lib/cups/backend/lpd
210 /usr/lib/cups/backend/parallel
211 /usr/lib/cups/backend/scsi
212 /usr/lib/cups/backend/serial
213 /usr/lib/cups/backend/socket
214 /usr/lib/cups/backend/usb
215 %dir /usr/lib/cups/cgi-bin
216 /usr/lib/cups/cgi-bin/*
217 %dir /usr/lib/cups/daemon
218 /usr/lib/cups/daemon/cups-deviced
219 /usr/lib/cups/daemon/cups-driverd
220 /usr/lib/cups/daemon/cups-polld
221 %dir /usr/lib/cups/driver
222 %dir /usr/lib/cups/filter
223 /usr/lib/cups/filter/*
224 %dir /usr/lib/cups/monitor
225 /usr/lib/cups/monitor/*
226 %dir /usr/lib/cups/notifier
227 /usr/lib/cups/notifier/*
228
229 /usr/sbin/*
230 %dir /usr/share/cups
231 /usr/share/cups/*
232 %dir /usr/share/doc/cups
233 /usr/share/doc/cups/*.*
234 %dir /usr/share/doc/cups/help
235 /usr/share/doc/cups/help/cgi.html
236 /usr/share/doc/cups/help/glossary.html
237 /usr/share/doc/cups/help/license.html
238 /usr/share/doc/cups/help/man-*.html
239 /usr/share/doc/cups/help/network.html
240 /usr/share/doc/cups/help/options.html
241 /usr/share/doc/cups/help/overview.html
242 /usr/share/doc/cups/help/ref-*.html
243 /usr/share/doc/cups/help/security.html
244 /usr/share/doc/cups/help/standard.html
245 /usr/share/doc/cups/help/translation.html
246 /usr/share/doc/cups/help/whatsnew.html
247 %dir /usr/share/doc/cups/images
248 /usr/share/doc/cups/images/*
249
250 %dir /usr/share/man/man1
251 /usr/share/man/man1/cancel.1.gz
252 /usr/share/man/man1/cupstestppd.1.gz
253 /usr/share/man/man1/lp.1.gz
254 /usr/share/man/man1/lpoptions.1.gz
255 /usr/share/man/man1/lppasswd.1.gz
256 /usr/share/man/man1/lpq.1.gz
257 /usr/share/man/man1/lpr.1.gz
258 /usr/share/man/man1/lprm.1.gz
259 /usr/share/man/man1/lpstat.1.gz
260 %dir /usr/share/man/man5
261 /usr/share/man/man5/*
262 %dir /usr/share/man/man8
263 /usr/share/man/man8/accept.8.gz
264 /usr/share/man/man8/cupsaddsmb.8.gz
265 /usr/share/man/man8/cupsd.8.gz
266 /usr/share/man/man8/cupsdisable.8.gz
267 /usr/share/man/man8/cupsenable.8.gz
268 /usr/share/man/man8/cups-deviced.8.gz
269 /usr/share/man/man8/cups-driverd.8.gz
270 /usr/share/man/man8/cups-polld.8.gz
271 /usr/share/man/man8/lpadmin.8.gz
272 /usr/share/man/man8/lpc.8.gz
273 /usr/share/man/man8/lpinfo.8.gz
274 /usr/share/man/man8/lpmove.8.gz
275 /usr/share/man/man8/reject.8.gz
276
277 %dir /var/cache/cups
278 %dir /var/log/cups
279 %dir /var/run/cups
280 %attr(0711,lp,sys) %dir /var/run/cups/certs
281 %attr(0710,lp,sys) %dir /var/spool/cups
282 %attr(1770,lp,sys) %dir /var/spool/cups/tmp
283
284 %files devel
285 %defattr(-,root,root)
286 %dir /usr/share/man/man1
287 /usr/share/man/man1/cups-config.1.gz
288 %dir /usr/share/man/man7
289 /usr/share/man/man7/*
290
291 /usr/bin/cups-config
292 %dir /usr/include/cups
293 /usr/include/cups/*
294 #/usr/lib/*.a
295 /usr/lib/*.so
296
297 %dir /usr/share/doc/cups/help
298 /usr/share/doc/cups/help/api*.html
299 /usr/share/doc/cups/help/spec*.html
300
301 %files libs
302 %defattr(-,root,root)
303 /usr/lib/*.so.*
304
305 %files lpd
306 %defattr(-,root,root)
307 #/etc/xinetd.d/cups-lpd
308 %dir /usr/lib/cups
309 %dir /usr/lib/cups/daemon
310 /usr/lib/cups/daemon/cups-lpd
311 %dir /usr/share/man/man8
312 /usr/share/man/man8/cups-lpd.8.gz
313
314 %files ja
315 %defattr(-,root,root)
316 %dir /usr/share/doc/cups/ja
317 /usr/share/doc/cups/ja/index.html
318 %dir /usr/share/doc/cups/ja/images
319 /usr/share/doc/cups/ja/images/*
320 %dir /usr/share/cups/templates/ja
321 /usr/share/cups/templates/ja/*
322 /usr/share/locale/ja/cups_ja.po
323
324 %if %{?_with_php:1}%{!?_with_php:0}
325 %files php
326 # PHP
327 /usr/lib/php*
328 %endif
329
330
331 #
332 # End of "$Id: cups.spec.in 5224 2006-03-04 02:00:43Z mike $".
333 #