source: spec/trunk/SPECS/cups.spec@ 695

Last change on this file since 695 was 691, checked in by Silvan Scherrer, 10 years ago

cups: update spec file, the last did show the strange rpm ticket #118 here

File size: 12.8 KB
Line 
1# this spec file is a combination from the fedora cups.spec and the
2# cups.spec as included in cups
3
4#define svn_url e:/trees/cups/trunk
5%define svn_url http://svn.netlabs.org/repos/ports/cups/trunk
6%define svn_rev 1360
7%define _strip_opts --compress -i "*.cgi" --debuginfo -i "*.cgi"
8
9%define _without_dbus 1
10%define _without_dnssd 1
11%define _without_systemd 1
12
13#
14# "$Id: cups.spec.in 9359 2010-11-11 19:09:24Z mike $"
15#
16# RPM "spec" file for CUPS.
17#
18# Original version by Jason McMullan <jmcc@ontv.com>.
19#
20# Copyright 2007-2015 by Apple Inc.
21# Copyright 1999-2007 by Easy Software Products, all rights reserved.
22#
23# These coded instructions, statements, and computer programs are the
24# property of Apple Inc. and are protected by Federal copyright
25# law. Distribution and use rights are outlined in the file "LICENSE.txt"
26# which should have been included with this file. If this file is
27# file is missing or damaged, see the license at "http://www.cups.org/".
28#
29
30# Conditional build options (--with name/--without name):
31#
32# dbus - Enable/disable DBUS support (default = enable)
33# dnssd - Enable/disable DNS-SD support (default = enable)
34# libusb1 - Enable/disable LIBUSB 1.0 support (default = enable)
35# static - Enable/disable static libraries (default = enable)
36# systemd - Enable/disable systemd support (default = enable)
37
38%{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
39%{?_with_dbus: %define _dbus --enable-dbus}
40%{!?_with_dbus: %define _dbus --disable-dbus}
41
42%{!?_with_dnssd: %{!?_without_dnssd: %define _with_dnssd --with-dnssd}}
43%{?_with_dnssd: %define _dnssd --enable-dnssd}
44%{!?_with_dnssd: %define _dnssd --disable-dnssd}
45
46%{!?_with_libusb1: %{!?_without_libusb1: %define _with_libusb1 --with-libusb1}}
47%{?_with_libusb1: %define _libusb1 --enable-libusb}
48%{!?_with_libusb1: %define _libusb1 --disable-libusb}
49
50%{!?_with_static: %{!?_without_static: %define _without_static --without-static}}
51%{?_with_static: %define _static --enable-static}
52%{!?_with_static: %define _static --disable-static}
53
54%{!?_with_systemd: %{!?_without_systemd: %define _with_systemd --with-systemd}}
55%{?_with_systemd: %define _systemd --enable-systemd}
56%{!?_with_systemd: %define _systemd --disable-systemd}
57
58Summary: CUPS
59Name: cups
60Version: 2.1.3
61Release: 1%{?dist}
62Epoch: 1
63
64License: GPL
65Group: System Environment/Daemons
66
67Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
68
69Url: http://www.cups.org
70Vendor: bww bitwise works GmbH
71
72# Dependencies...
73Requires: %{name}-filesystem = %{epoch}:%{version}-%{release}
74Requires: %{name}-libs = %{epoch}:%{version}-%{release}
75Requires: %{name}-client = %{epoch}:%{version}-%{release}
76
77Provides: cupsddk, cupsddk-drivers
78
79%if %{?_with_dbus:1}%{!?_with_dbus:0}
80BuildRequires: dbus-devel
81%endif
82
83%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
84BuildRequires: avahi-devel
85%endif
86
87%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
88BuildRequires: libusb1-devel >= 1.0
89%endif
90
91%if %{?_with_systemd:1}%{!?_with_systemd:0}
92BuildRequires: systemd-devel
93%endif
94
95BuildRequires: libpng-devel, libjpeg-devel, libtiff-devel
96BuildRequires: openssl-devel, zlib-devel
97BuildRequires: libpoll-devel
98
99# Use buildroot so as not to disturb the version already installed
100BuildRoot: %{_tmppath}/%{name}-root
101
102%package devel
103Summary: CUPS printing system - development environment
104Group: Development/Libraries
105Requires: %{name}-libs = %{epoch}:%{version}-%{release}
106Provides: cupsddk-devel
107
108%package libs
109Summary: CUPS printing system - shared libraries
110Group: System Environment/Libraries
111
112%package filesystem
113Summary: CUPS printing system - directory layout
114BuildArch: noarch
115
116%package lpd
117Summary: CUPS printing system - lpd emulation
118Group: System Environment/Daemons
119Requires: %{name} = %{epoch}:%{version}-%{release}
120Requires: %{name}-libs = %{epoch}:%{version}-%{release}
121Provides: lpd
122
123%package ipptool
124Summary: CUPS printing system - tool for performing IPP requests
125Requires: %{name} = %{epoch}:%{version}-%{release}
126
127%package client
128Summary: CUPS printing system - client programs
129Requires: %{name}-libs = %{epoch}:%{version}-%{release}
130Provides: lpr
131
132%description
133CUPS printing system provides a portable printing layer for
134UNIX© operating systems. It has been developed by Apple Inc.
135to promote a standard printing solution for all UNIX vendors and users.
136CUPS provides the System V and Berkeley command-line interfaces.
137CUPS was ported to OS/2 to have the same benefit as UNIX has.
138
139%description client
140CUPS printing system provides a portable printing layer for
141UNIX© operating systems. This package contains command-line client
142programs.
143
144%description devel
145CUPS printing system provides a portable printing layer for
146UNIX© operating systems. This is the development package for creating
147additional printer drivers, and other CUPS services.
148
149%description libs
150CUPS printing system provides a portable printing layer for
151UNIX© operating systems. It has been developed by Apple Inc.
152to promote a standard printing solution for all UNIX vendors and users.
153CUPS provides the System V and Berkeley command-line interfaces.
154CUPS was ported to OS/2 to have the same benefit as UNIX has.
155The cups-libs package provides libraries used by applications to use CUPS
156natively, without needing the lpp/lpr commands.
157
158%description filesystem
159CUPS printing system provides a portable printing layer for
160UNIX© operating systems. This package provides some directories which are
161required by other packages that add CUPS drivers (i.e. filters, backends etc.)
162
163%description lpd
164CUPS printing system provides a portable printing layer for
165UNIX© operating systems. This is the package that provides standard
166lpd emulation.
167
168%description ipptool
169Sends IPP requests to the specified URI and tests and/or displays the result.
170
171%debug_package
172
173%prep
174%if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
175%setup -q
176%else
177%setup -n "%{name}-%{version}" -Tc
178svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
179rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
180(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
181%endif
182
183autoconf --force
184
185%build
186export LDFLAGS=" -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
187export LIBS="-lurpo -lpoll"
188# --with-rcdir=no - don't install SysV init script
189CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$LDFLAGS $RPM_OPT_FLAGS" \
190 %configure %{_dbus} %{_dnssd} %{_libusb1} %{_static} \
191 --with-rcdir=no
192
193# If we got this far, all prerequisite libraries must be here.
194make
195
196%install
197# Make sure the RPM_BUILD_ROOT directory exists.
198rm -rf $RPM_BUILD_ROOT
199
200make BUILDROOT=$RPM_BUILD_ROOT install
201
202# rename some files
203mv %{buildroot}%{_mandir}/man1/cancel.1 %{buildroot}%{_mandir}/man1/cancel-cups.1
204mv %{buildroot}%{_mandir}/man1/lp.1 %{buildroot}%{_mandir}/man1/lp-cups.1
205mv %{buildroot}%{_mandir}/man1/lpq.1 %{buildroot}%{_mandir}/man1/lpq-cups.1
206mv %{buildroot}%{_mandir}/man1/lprm.1 %{buildroot}%{_mandir}/man1/lprm-cups.1
207mv %{buildroot}%{_mandir}/man1/lpstat.1 %{buildroot}%{_mandir}/man1/lpstat-cups.1
208mv %{buildroot}%{_mandir}/man8/lpc.8 %{buildroot}%{_mandir}/man8/lpc-cups.8
209
210%clean
211rm -rf $RPM_BUILD_ROOT
212
213%files
214%doc README.txt CREDITS.txt CHANGES.txt
215%docdir %{_datadir}/doc/cups
216%defattr(-,root,root)
217%dir %{_sysconfdir}/cups
218%config(noreplace) %{_sysconfdir}/cups/*.conf
219%{_sysconfdir}/cups/cups-files.conf.default
220%{_sysconfdir}/cups/cupsd.conf.default
221%{_sysconfdir}/cups/snmp.conf.default
222%dir %{_sysconfdir}/cups/interfaces
223%dir %{_sysconfdir}/cups/ppd
224%attr(0700,root,root) %dir %{_sysconfdir}/cups/ssl
225
226%if %{?_with_dbus:1}%{!?_with_dbus:0}
227# DBUS
228%{_sysconfdir}/dbus-1/system.d/*
229%endif
230
231%{_bindir}/cupstestdsc.exe
232%{_bindir}/cupstestppd.exe
233%dir %{_libdir}/cups
234%dir %{_libdir}/cups/backend
235%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
236# DNS-SD
237%{_libdir}/cups/backend/dnssd
238%endif
239%{_libdir}/cups/backend/http
240#{_libdir}/cups/backend/https
241%attr(0700,root,root) %{_libdir}/cups/backend/ipp.exe
242#{_libdir}/cups/backend/ipps
243%attr(0700,root,root) %{_libdir}/cups/backend/lpd.exe
244%{_libdir}/cups/backend/snmp.exe
245%{_libdir}/cups/backend/socket.exe
246%{_libdir}/cups/backend/usb.exe
247%dir %{_libdir}/cups/cgi-bin
248%{_libdir}/cups/cgi-bin/*
249%dir %{_libdir}/cups/daemon
250%{_libdir}/cups/daemon/cups-deviced.exe
251%{_libdir}/cups/daemon/cups-driverd.exe
252%{_libdir}/cups/daemon/cups-exec.exe
253%dir %{_libdir}/cups/driver
254%dir %{_libdir}/cups/filter
255%{_libdir}/cups/filter/*
256%dir %{_libdir}/cups/monitor
257%{_libdir}/cups/monitor/*
258%dir %{_libdir}/cups/notifier
259%{_libdir}/cups/notifier/*
260
261%{_sbindir}/*
262%{_datadir}/cups/drv/*
263%{_datadir}/cups/mime/*
264%{_datadir}/cups/ppdc/*
265%dir %{_datadir}/cups/templates
266%{_datadir}/cups/templates/*
267%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
268# LIBUSB quirks files
269%dir %{_datadir}/cups/usb
270%{_datadir}/cups/usb/*
271%endif
272
273%dir %{_datadir}/doc/cups
274%{_datadir}/doc/cups/*.*
275%dir %{_datadir}/doc/cups/help
276%{_datadir}/doc/cups/help/accounting.html
277%{_datadir}/doc/cups/help/cgi.html
278%{_datadir}/doc/cups/help/glossary.html
279%{_datadir}/doc/cups/help/kerberos.html
280%{_datadir}/doc/cups/help/license.html
281%{_datadir}/doc/cups/help/man-*.html
282%{_datadir}/doc/cups/help/network.html
283%{_datadir}/doc/cups/help/options.html
284%{_datadir}/doc/cups/help/overview.html
285%{_datadir}/doc/cups/help/policies.html
286%{_datadir}/doc/cups/help/ref-*.html
287%{_datadir}/doc/cups/help/security.html
288%{_datadir}/doc/cups/help/sharing.html
289%{_datadir}/doc/cups/help/translation.html
290%dir %{_datadir}/doc/cups/images
291%{_datadir}/doc/cups/images/*
292
293%dir %{_datadir}/doc/cups/de
294%{_datadir}/doc/cups/de/*
295%dir %{_datadir}/doc/cups/es
296%{_datadir}/doc/cups/es/*
297%dir %{_datadir}/doc/cups/ja
298%{_datadir}/doc/cups/ja/*
299%dir %{_datadir}/doc/cups/ru
300%{_datadir}/doc/cups/ru/*
301
302%{_datadir}/locale/*
303
304%dir %{_datadir}/man
305%dir %{_datadir}/man/man1
306%{_datadir}/man/man1/*.1
307%dir %{_datadir}/man/man5
308%{_datadir}/man/man5/*.5
309%dir %{_datadir}/man/man8
310%{_datadir}/man/man8/*.8
311
312%dir %{_var}/cache/cups
313%attr(0775,root,sys) %dir %{_var}/cache/cups/rss
314%dir %{_var}/log/cups
315%dir %{_var}/run/cups
316#attr(0711,lp,sys) %dir %{_var}/run/cups/certs
317%attr(0710,lp,sys) %dir %{_var}/spool/cups
318%attr(1770,lp,sys) %dir %{_var}/spool/cups/tmp
319
320%files client
321%{_sbindir}/lpc.exe
322%{_bindir}/cancel.exe
323%{_bindir}/lp*.exe
324%dir %{_datadir}/man/man1
325%{_datadir}/man/man1/lp*.1
326%{_datadir}/man/man1/cancel-cups*.1
327%dir %{_datadir}/man/man8
328%{_datadir}/man/man8/lpc-cups.8
329
330%files libs
331%doc LICENSE.txt
332%defattr(-,root,root)
333%{_libdir}/*.dll
334
335%files filesystem
336%dir %{_libdir}/cups
337%dir %{_libdir}/cups/backend
338%dir %{_libdir}/cups/driver
339%dir %{_libdir}/cups/filter
340%dir %{_datadir}/cups
341%dir %{_datadir}/cups/data
342%dir %{_datadir}/cups/drv
343%dir %{_datadir}/cups/mime
344%dir %{_datadir}/cups/model
345%dir %{_datadir}/cups/ppdc
346#dir %{_datadir}/ppd
347
348%files devel
349%defattr(-,root,root)
350%{_bindir}/cups-config
351%{_bindir}/ppd*.exe
352%{_libdir}/*.a
353%dir %{_includedir}/cups
354%{_includedir}/cups/*
355
356%dir %{_datadir}/cups/examples
357%{_datadir}/cups/examples/*
358%dir %{_datadir}/man
359%dir %{_datadir}/man/man1
360%{_datadir}/man/man1/cups-config.1
361%{_datadir}/man/man1/ppd*.1
362%dir %{_datadir}/man/man5
363%{_datadir}/man/man5/ppdcfile.5
364%dir %{_datadir}/man/man7
365%{_datadir}/man/man7/backend.7
366%{_datadir}/man/man7/filter.7
367%{_datadir}/man/man7/notifier.7
368
369%if %{?_with_static:1}%{!?_with_static:0}
370%{_libdir}/*_s.a
371%endif
372
373%dir %{_datadir}/doc/cups/help
374%{_datadir}/doc/cups/help/api*.html
375%{_datadir}/doc/cups/help/postscript-driver.html
376%{_datadir}/doc/cups/help/ppd-compiler.html
377%{_datadir}/doc/cups/help/raster-driver.html
378%{_datadir}/doc/cups/help/spec*.html
379
380%files lpd
381%defattr(-,root,root)
382%if %{?_with_systemd:1}%{!?_with_systemd:0}
383# SystemD
384%{_libdir}/systemd/system/org.cups.cups-lpd*
385%else
386# Legacy xinetd
387#{_sysconfdir}/xinetd.d/cups-lpd
388%endif
389
390%dir %{_libdir}/cups
391%dir %{_libdir}/cups/daemon
392%{_libdir}/cups/daemon/cups-lpd.exe
393%dir %{_datadir}/man/man8
394%{_datadir}/man/man8/cups-lpd.8
395
396%files ipptool
397%defattr(-,root,root)
398%if %{?_with_dnssd:1}%{!?_with_dnssd:0}
399%{_bindir}/ippfind.exe
400%endif
401%{_bindir}/ipptool.exe
402%dir %{_datadir}/cups/ipptool
403%{_datadir}/cups/ipptool/*
404%dir %{_datadir}/man/man1
405%{_datadir}/man/man1/ipptool*.1
406%dir %{_datadir}/man/man5
407%{_datadir}/man/man5/ipptool*.5
408
409%changelog
410* Mon Mar 07 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.1.3-1
411- updated to version 2.1.3
412
413* Fri Mar 04 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.8-5
414- fixed lpd
415- added more socketpair vs pipe changes
416- also compress and strip debug info from cgi files
417
418* Thu Jan 26 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.8-4
419- poppler-utils needs to be at least 0.38.0-2
420- remove wrong req for cups-lpr
421- install all .a files for the dll
422
423* Mon Jan 11 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.8-3
424- rebuild with latest libraries
425- adjusted debug package creation to latest rpm macros
426- add poppler-utils as a requirement
427
428* Sun Feb 15 2015 yd <yd@os2power.com> 1.4.8-1 1.4.8-2
429- rebuild for new libpng release.
430
431* Tue Dec 18 2014 yd
432- r944, initial unixroot build.
Note: See TracBrowser for help on using the repository browser.