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

Last change on this file since 1504 was 1293, checked in by Silvan Scherrer, 8 years ago

spec: hplip: Release version 3.17.11-1.

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