source: spec/trunk/SPECS/hplip.spec@ 1212

Last change on this file since 1212 was 1067, checked in by Silvan Scherrer, 9 years ago

spec: hplip: Release version 3.16.11-1.

File size: 9.5 KB
Line 
1
2%define without_sane 1
3%define without_dbus 1
4%define without_fax 1
5
6Summary: HP Linux Imaging and Printing Project
7Name: hplip
8Version: 3.16.11
9Release: 1%{?dist}
10License: GPLv2+ and MIT and BSD
11
12Url: http://hplipopensource.com/
13%scm_source svn http://svn.netlabs.org/repos/ports/hplip/trunk 2155
14Vendor: bww bitwise works GmbH
15
16# @todo: decide if we need that to
17# if we do it as well, also remove the coment in the post section
18#Source1: hpcups-update-ppds.sh
19
20Requires: %{name}-libs = %{version}-%{release}
21#Requires: python-pillow
22Requires: cups
23Requires: wget
24%if 0%{!?without_dbus:1}
25Requires: python-dbus
26%endif
27#Requires: gnupg
28# /usr/lib/udev/rules.d
29#Requires: systemd
30
31BuildRequires: autoconf automake libtool
32#BuildRequires: net-snmp-devel
33BuildRequires: cups-devel
34BuildRequires: python-devel
35BuildRequires: libjpeg-devel
36#BuildRequires: desktop-file-utils
37BuildRequires: libusb1-devel
38BuildRequires: openssl-devel
39%if 0%{!?without_sane:1}
40BuildRequires: sane-backends-devel
41%endif
42%if 0%{!?without_dbus:1}
43BuildRequires: pkgconfig(dbus-1)
44%endif
45
46# Make sure we get postscriptdriver tags.
47#BuildRequires: python-cups
48
49# macros: %%{_tmpfilesdir}, %%{_udevrulesdir}
50#BuildRequires: systemd
51
52# hpijs was merged into main package in 3.15.7-2
53Obsoletes: hpijs < 1:%{version}-%{release}
54Provides: hpijs = 1:%{version}-%{release}
55
56%description
57The Hewlett-Packard Linux Imaging and Printing Project provides
58drivers for HP printers and multi-function peripherals.
59
60%package common
61Summary: Files needed by the HPLIP printer and scanner drivers
62License: GPLv2+
63
64%description common
65Files needed by the HPLIP printer and scanner drivers.
66
67%package libs
68Summary: HPLIP libraries
69License: GPLv2+ and MIT
70Requires: %{name}-common = %{version}-%{release}
71Requires: python
72Obsoletes: %{name}-compat-libs < %{version}-%{release}
73
74%description libs
75Libraries needed by HPLIP.
76
77%package gui
78Summary: HPLIP graphical tools
79License: BSD
80Requires: python2-PyQt4
81#Requires: python-reportlab
82# hpssd.py
83#Requires: python-gobject
84Requires: %{name} = %{version}-%{release}
85%if 0%{!?without_sane:1}
86Requires: libsane-hpaio = %{version}-%{release}
87%endif
88
89%description gui
90HPLIP graphical tools.
91
92%if 0%{!?without_sane:1}
93%package -n libsane-hpaio
94Summary: SANE driver for scanners in HP's multi-function devices
95License: GPLv2+
96Obsoletes: libsane-hpoj < 0.91
97Provides: libsane-hpoj = 0.91
98Requires: sane-backends
99Requires: %{name}-libs = %{version}-%{release}
100
101%description -n libsane-hpaio
102SANE driver for scanners in HP's multi-function devices (from HPOJ).
103%endif
104
105%debug_package
106
107%prep
108%scm_setup
109
110
111%build
112# Work-around Makefile.am imperfections.
113sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in
114# Upstream uses old libtool, which causes problems (due to libhpmud requiring
115# libhpdiscovery) when we try to remove rpath from it.
116# Regenerating all autotools files works-around these rpath issues.
117autoreconf --verbose --force --install
118
119export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
120export LIBS="-lcx"
121export VENDOR="%{vendor}"
122
123%configure \
124%if 0%{!?without_sane:1}
125 --enable-scan-build \
126%else
127 --disable-scan-build \
128%endif
129 --enable-gui-build \
130 --disable-foomatic-rip-hplip-install \
131 --enable-qt4 \
132 --enable-hpcups-install --enable-cups-drv-install \
133 --enable-foomatic-drv-install \
134 --enable-hpijs-install \
135%if 0%{!?without_fax:1}
136 --enable-fax-build \
137%else
138 --enable-fax-build=no \
139%endif
140%if 0%{?without_dbus:1}
141 --enable-dbus-build=no \
142%endif
143 --disable-policykit --with-mimedir=%{_datadir}/cups/mime \
144 --disable-network-build --enable-shared --disable-static \
145 --with-cupsbackenddir=%{_cups_serverbin}/backend \
146 --with-cupsfilterdir=%{_cups_serverbin}/filter \
147 --with-icondir=%{_datadir}/applications \
148 --with-systraydir=%{_sysconfdir}/xdg/autostart
149
150make %{?_smp_mflags}
151
152
153%install
154mkdir -p %{buildroot}%{_bindir}
155make install DESTDIR=%{buildroot}
156
157# Remove unpackaged files
158rm -rf %{buildroot}%{_sysconfdir}/sane.d \
159 %{buildroot}%{_docdir} \
160 %{buildroot}%{_datadir}/hal \
161 %{buildroot}%{_datadir}/hplip/pkservice.py \
162 %{buildroot}%{_bindir}/hp-pkservice \
163 %{buildroot}%{_datadir}/applications \
164
165rm -f %{buildroot}%{_bindir}/hp-logcapture \
166 %{buildroot}%{_bindir}/hp-doctor \
167 %{buildroot}%{_datadir}/hplip/logcapture.py \
168 %{buildroot}%{_datadir}/hplip/doctor.py
169
170rm -f %{buildroot}%{_bindir}/foomatic-rip \
171 %{buildroot}%{_libdir}/cups/filter/foomatic-rip \
172 %{buildroot}%{_libdir}/*.la \
173 %{buildroot}%{python_sitearch}/*.la \
174 %{buildroot}%{_libdir}/sane/*.la \
175 %{buildroot}%{_datadir}/cups/model/foomatic-ppds \
176 %{buildroot}%{_datadir}/ppd/HP/*.ppd
177
178
179# Regenerate hpcups PPDs on upgrade if necessary (bug #579355).
180#install -p -m755 %{SOURCE1} %{buildroot}%{_bindir}/hpcups-update-ppds
181
182# Images in docdir should not be executable (bug #440552).
183find doc/images -type f -exec chmod 644 {} \;
184
185# Create an empty plugins directory to make sure it gets the right
186# SELinux file context (bug #564551).
187%{__mkdir_p} %{buildroot}%{_datadir}/hplip/prnt/plugins
188
189# Create an empty var/run/hplip directory
190%{__mkdir_p} %{buildroot}%{_localstatedir}/run/hplip
191
192# Remove files we don't want to package.
193rm -f %{buildroot}%{_datadir}/hplip/hpaio.desc
194rm -f %{buildroot}%{_datadir}/hplip/hplip-install
195rm -rf %{buildroot}%{_datadir}/hplip/install.*
196rm -f %{buildroot}%{_datadir}/hplip/uninstall.*
197rm -f %{buildroot}%{_bindir}/hp-uninstall
198rm -f %{buildroot}%{_datadir}/hplip/upgrade.*
199rm -f %{buildroot}%{_bindir}/hp-upgrade
200rm -f %{buildroot}%{_datadir}/hplip/hpijs.drv.in.template
201rm -f %{buildroot}%{_datadir}/cups/mime/pstotiff.types
202rm -f %{buildroot}%{_datadir}/hplip/fax/pstotiff*
203rm -rf %{buildroot}%{_libdir}/systemd
204
205# The systray applet doesn't work properly (displays icon as a
206# window), so don't ship the launcher yet.
207rm -rf %{buildroot}%{_sysconfdir}/xdg
208
209# as there is no devel package we don't ship the *.a files either
210rm -f %{buildroot}%{_libdir}/*.a \
211 %{buildroot}%{python_sitearch}/*.a
212
213%files
214%doc COPYING doc/*
215# ex-hpijs
216%{_bindir}/hpijs.exe
217# ex-hpijs
218#%{_bindir}/hpcups-update-ppds
219%{_bindir}/hp-align
220%{_bindir}/hp-clean
221%{_bindir}/hp-colorcal
222%{_bindir}/hp-config_usb_printer
223%{_bindir}/hp-devicesettings
224%{_bindir}/hp-diagnose_plugin
225%{_bindir}/hp-diagnose_queues
226%{_bindir}/hp-fab
227%{_bindir}/hp-faxsetup
228%{_bindir}/hp-firmware
229%{_bindir}/hp-info
230%{_bindir}/hp-levels
231%{_bindir}/hp-linefeedcal
232%{_bindir}/hp-makecopies
233%{_bindir}/hp-makeuri
234%{_bindir}/hp-plugin
235%{_bindir}/hp-pqdiag
236%{_bindir}/hp-printsettings
237%{_bindir}/hp-probe
238%{_bindir}/hp-query
239%{_bindir}/hp-scan
240%{_bindir}/hp-sendfax
241%{_bindir}/hp-setup
242%{_bindir}/hp-testpage
243%{_bindir}/hp-timedate
244%{_bindir}/hp-unload
245%{_bindir}/hp-wificonfig
246%{_cups_serverbin}/backend/*.exe
247# ex-hpijs
248%{_cups_serverbin}/filter/*.exe
249%{_cups_serverbin}/filter/hpps
250%{_cups_serverbin}/filter/pstotiff
251# ex-hpijs
252%{_datadir}/cups/drv/*
253%if 0%{!?without_fax:1}
254%{_datadir}/cups/mime/pstotiff.convs
255%endif
256# Files
257%{_datadir}/hplip/align.py*
258%{_datadir}/hplip/check-plugin.py*
259%{_datadir}/hplip/clean.py*
260%{_datadir}/hplip/colorcal.py*
261%{_datadir}/hplip/config_usb_printer.py*
262%{_datadir}/hplip/devicesettings.py*
263%{_datadir}/hplip/diagnose_plugin.py*
264%{_datadir}/hplip/diagnose_queues.py*
265%{_datadir}/hplip/fab.py*
266%if 0%{!?without_fax:1}
267%{_datadir}/hplip/fax
268%endif
269%{_datadir}/hplip/faxsetup.py*
270%{_datadir}/hplip/firmware.py*
271%{_datadir}/hplip/hpdio.py*
272%{_datadir}/hplip/hplip_clean.sh
273%{_datadir}/hplip/hpssd*
274%{_datadir}/hplip/info.py*
275%{_datadir}/hplip/__init__.py*
276%{_datadir}/hplip/levels.py*
277%{_datadir}/hplip/linefeedcal.py*
278%{_datadir}/hplip/makecopies.py*
279%{_datadir}/hplip/makeuri.py*
280%{_datadir}/hplip/plugin.py*
281%{_datadir}/hplip/pqdiag.py*
282%{_datadir}/hplip/printsettings.py*
283%{_datadir}/hplip/probe.py*
284%{_datadir}/hplip/query.py*
285%{_datadir}/hplip/scan.py*
286%{_datadir}/hplip/sendfax.py*
287%{_datadir}/hplip/setup.py*
288%{_datadir}/hplip/testpage.py*
289%{_datadir}/hplip/timedate.py*
290%{_datadir}/hplip/unload.py*
291%{_datadir}/hplip/wificonfig.py*
292# Directories
293%{_datadir}/hplip/base
294%{_datadir}/hplip/copier
295%{_datadir}/hplip/data/ldl
296%{_datadir}/hplip/data/localization
297%{_datadir}/hplip/data/pcl
298%{_datadir}/hplip/data/ps
299%{_datadir}/hplip/installer
300%{_datadir}/hplip/pcard
301%{_datadir}/hplip/prnt
302%if 0%{!?without_sane:1}
303%{_datadir}/hplip/scan
304%endif
305%{_datadir}/ppd
306#%{_sharedstatedir}/hp
307%dir %attr(0775,root,lp) %{_localstatedir}/run/hplip
308#%{_tmpfilesdir}/hplip.conf
309%{_sysconfdir}/udev/rules.d/56-hpmud.rules
310
311%files common
312%license COPYING
313%dir %{_sysconfdir}/hp
314%config(noreplace) %{_sysconfdir}/hp/hplip.conf
315%dir %{_datadir}/hplip
316%dir %{_datadir}/hplip/data
317%{_datadir}/hplip/data/models
318
319%files libs
320%{_libdir}/hpip*.dll
321#%{_libdir}/hpdis*.dll
322%{_libdir}/hpmud*.dll
323# Python extension
324%{python_sitearch}/*.dll
325
326%files gui
327%{_bindir}/hp-check
328%{_bindir}/hp-print
329%{_bindir}/hp-systray
330%{_bindir}/hp-toolbox
331#%{_datadir}/applications/*.desktop
332# Files
333%{_datadir}/hplip/check.py*
334%{_datadir}/hplip/print.py*
335%{_datadir}/hplip/systray.py*
336%{_datadir}/hplip/toolbox.py*
337# Directories
338%{_datadir}/hplip/data/images
339%{_datadir}/hplip/ui4
340
341%if 0%{!?without_sane:1}
342%files -n libsane-hpaio
343%{_libdir}/sane/sane-*.dll
344%endif
345
346%post
347#%{_bindir}/hpcups-update-ppds &>/dev/null ||:
348
349#%post libs -p /sbin/ldconfig
350
351#%postun libs -p /sbin/ldconfig
352
353%changelog
354* Tue Mar 21 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> - 3.16.11-1
355- fix gui Requires
356- use new scm_ macros
357- update to version 3.16.11
358
359* Mon Jun 13 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 3.16.3-1
360- initial port
Note: See TracBrowser for help on using the repository browser.