source: projects/specs/trunk/h/hplip/hplip-vl.spec @ 12469

Revision 12469, 30.0 KB checked in by tomop, 4 years ago (diff)

python-3.8.5 and related packages.

Line 
1# %define python_platlib %(python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)')
2Summary:        HP printer drivers & utilities for Linux
3Summary(ja):    HP プリンタの Linux 向けドライバとユーティリティ
4Name:           hplip
5Version:        3.20.6
6Release:        1%{?_dist_release}
7Vendor:         Project Vine
8Distribution:   Vine Linux
9Packager:       kazutaka
10
11License:        GPLv2+, MIT and BSD
12Group:          Applications/Publishing
13URL:            https://developers.hp.com/hp-linux-imaging-and-printing
14
15Source0:        http://downloads.sourceforge.net/sourceforge/hplip/hplip-%{version}.tar.gz
16#Source1:       hpcups-update-ppds.sh
17Source2:        copy-deviceids.py
18Source3:        %{name}.appdata.xml
19Source4:        hp-laserjet_cp_1025nw.ppd.gz
20Source5:        hp-laserjet_professional_p_1102w.ppd.gz
21Source1000:     hplip.desktop.vine
22
23Patch1: hplip-pstotiff-is-rubbish.patch
24Patch2: hplip-strstr-const.patch
25Patch3: hplip-ui-optional.patch
26Patch4: hplip-no-asm.patch
27Patch5: hplip-deviceIDs-drv.patch
28Patch6: hplip-udev-rules.patch
29Patch7: hplip-retry-open.patch
30Patch8: hplip-snmp-quirks.patch
31Patch9: hplip-hpijs-marker-supply.patch
32Patch10: hplip-clear-old-state-reasons.patch
33Patch11: hplip-hpcups-sigpipe.patch
34Patch12: hplip-logdir.patch
35Patch13: hplip-bad-low-ink-warning.patch
36Patch14: hplip-deviceIDs-ppd.patch
37Patch15: hplip-ppd-ImageableArea.patch
38Patch16: hplip-scan-tmp.patch
39Patch17: hplip-log-stderr.patch
40Patch18: hplip-avahi-parsing.patch
41Patch20: hplip-dj990c-margin.patch
42Patch21: hplip-strncpy.patch
43Patch22: hplip-no-write-bytecode.patch
44Patch23: hplip-silence-ioerror.patch
45Patch24: hplip-3165-sourceoption.patch
46Patch25: hplip-noernie.patch
47Patch26: hplip-appdata.patch
48Patch27: hplip-check-cups.patch
49Patch30: hplip-typo.patch
50# python3 - recent HP release removed encoding/decoding to utf-8 in fax/pmlfax.py -
51# that results in text string going into translate function in base/utils.py, which
52# expects binary string because of parameters. Remove this patch if base/utils.py
53# code gets fixed.
54Patch31: hplip-use-binary-str.patch
55# m278-m281 doesn't work correctly again
56Patch32: hplip-error-print.patch
57Patch33: hplip-hpfax-importerror-print.patch
58Patch34: hplip-wifisetup.patch
59# pgp.mit.edu keyserver got bad connection, so we need to have pool of keyservers
60# to choose (Bz#1641100, launchpad#1799212)
61Patch35: hplip-keyserver.patch
62# QMessagebox call was copy-pasted from Qt4 version, but Qt5 has different arguments,
63# This patch solves most of them
64Patch36: 0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch
65# HP upstream introduced new binary blob, which is not open-source, so it violates
66# FPG by two ways - shipping binary blob and non open source code - so it needs to be removed.
67# Patch is taken from Debian.
68Patch37: 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
69# In hplip-3.18.10 some parts of UI code was commented out, which leaved hp-toolbox
70# unusable (crashed on the start). The patch removes usages of variables, which were
71# commented out.
72# The patch is taken from Debian.
73Patch38: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch
74# hp-setup crashed when user wanted to define a path to PPD file. It was due
75# byte + string variables incompatibility and it is fixed by decoding the
76# bytes-like variable
77# part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076
78# reported upstream https://bugs.launchpad.net/hplip/+bug/1814272
79Patch39: hplip-add-ppd-crash.patch
80# external scripts, which are downloaded and run by hp-plugin, try to create links
81# in non-existing dirs. These scripts ignore errors, so plugin is installed fine
82# but then internal hp-plugin can check for plugin state, where links are checked too.
83# It results in corrupted plugin state, which breaks printer installation by GUI hp-setup.
84# Temporary workaround is to ignore these bad links and real fix should come from HP,
85# because their external scripts try to create links in non-existing dirs.
86# Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1671513
87# Reported upstream: https://bugs.launchpad.net/hplip/+bug/1814574
88Patch40: hplip-missing-links.patch
89# change in 3.18.9 in scanext.c caused broken scanning for HP LaserJet 3052. Since I cannot figure
90# it out what author wanted by the change (it sets option number 9 to true, but different handles
91# have different options, so I'm not sure what author wanted to set).
92# Remove the change for now, it works for user and me.
93Patch41: hplip-hplj-3052.patch
94# hpmud parses mdns txt record badly
95# upstream tickets: https://bugs.launchpad.net/hplip/+bug/1797501
96#                   https://bugs.launchpad.net/hplip/+bug/1817214
97#                   https://bugs.launchpad.net/hplip/+bug/1821932
98# with no response from upstream
99# Patch taken from Debian https://lists.debian.org/debian-printing/2018/11/msg00049.html
100Patch42: hplip-hpmud-string-parse.patch
101# Part of https://bugzilla.redhat.com/show_bug.cgi?id=1694663
102# It was found out that specific device needs plugin for scanning
103# Reported upstream as https://bugs.launchpad.net/hplip/+bug/1822762
104Patch43: hplip-m278-m281-needs-plugin.patch
105# hpcups crashes when a printer needs a plugin and does not have one installed
106# it crashes in destructor, because pointer is not initialized
107# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1695716
108# reported upstream
109Patch44: hplip-hpcups-crash.patch
110# Fixing the issues found by coverity scan
111# reported upstream https://bugs.launchpad.net/hplip/+bug/1808145
112Patch45: hplip-covscan.patch
113# Segfault during logging to syslog because argument are switched
114# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1727162
115# upstream https://bugs.launchpad.net/hplip/+bug/1837846
116Patch46: hplip-logging-segfault.patch
117# Traceback in hp-systray when there are no resource
118# wanted to report upstream, but launchpad ends with timeout error
119# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1738321
120Patch47: hplip-systray-blockerror.patch
121# several printers were removed in 3.19.1, but actually someone still uses them
122# reported upstream https://bugs.launchpad.net/hplip/+bug/1843592
123# bugzillas 1742949, 1740132, 1739855
124Patch48: hplip-missing-drivers.patch
125# laserjet 2200 and other devices have different device id than HP expects...
126# https://bugzilla.redhat.com/show_bug.cgi?id=1772698
127# reported upstream https://bugs.launchpad.net/hplip/+bug/1853002
128Patch49: hplip-model-mismatch.patch
129# sixext has problems with python3 strings (bz#1573430)
130# reported https://bugs.launchpad.net/bugs/1480152
131Patch50: hplip-unicodeerror.patch
132# error with new gcc, already reported in upstream as
133# https://bugs.launchpad.net/hplip/+bug/1836735
134Patch51: hplip-fix-Wreturn-type-warning.patch
135# upstream check for python clears OS build system
136# CFLAGS
137# https://bugs.launchpad.net/hplip/+bug/1879445
138Patch52: hplip-configure-python.patch
139# taken from hplip upstream report - toolbox uses deprecated method
140# setMargin(), which generates an exception, resulting in a infinite loop
141# of request on cupsd
142# https://bugs.launchpad.net/hplip/+bug/1880275
143Patch53: hplip-dialog-infinite-loop.patch
144# searching algorithm did not expect '-' in model name and thought it is a new PDL
145# it resulted in incorrect PPD match, so e.g. hpijs driver was used instead of hpcups
146# bug: https://bugzilla.redhat.com/show_bug.cgi?id=1590014
147# reported upstream: https://bugs.launchpad.net/hplip/+bug/1881587
148Patch54: hplip-find-driver.patch
149# hp-clean didn't work for Photosmart C1410 because it was comparing
150# string length with buffer size for string object, which is different,
151# causing cleaning to fail - the fix is to make the object bytes-like,
152# then buffer size is the same as the length.
153# Thanks to Stefan Assmann we were able to fix level 1 cleaning
154# for the device, but there can be similar issues with other devices
155# bug https://bugzilla.redhat.com/show_bug.cgi?id=1833308
156# reported upstream https://bugs.launchpad.net/hplip/+bug/1882193
157Patch55: hplip-clean-ldl.patch
158# 3.20.6 turned off requirement for most devices which needed it
159# - it will cause malfunction of printing and scanning for them
160# https://bugs.launchpad.net/hplip/+bug/1883898
161Patch56: hplip-revert-plugins.patch
162# python3.9 removes threading.Thread.isAlive() and it is substituted
163# by threading.Thread.is_alive()
164# https://bugzilla.redhat.com/show_bug.cgi?id=1861055
165# reported upstream https://bugs.launchpad.net/fedora/+bug/1889280
166Patch57: hplip-thread-isalive-removed.patch
167
168# Vine Patches
169Patch70:        hplip-3.11.5-gksu.patch
170Patch80:        hplip-3.16.5-hpijs.patch
171
172BuildRoot:      %{_tmppath}/%{name}-%{version}-root
173Requires:       cups
174Requires:       dbus
175Requires:       dbus-python3
176Requires:       foomatic
177Requires:       ghostscript
178Requires:       openssl
179Requires:       %{name}-libs = %{version}-%{release}
180BuildRequires:  cups-devel
181BuildRequires:  dbus-devel
182BuildRequires:  desktop-file-utils
183BuildRequires:  libusb1-devel
184BuildRequires:  libjpeg-devel
185BuildRequires:  net-snmp-devel
186BuildRequires:  openssl-devel
187BuildRequires:  python3-devel
188BuildRequires:  python3-rpm-macros
189BuildRequires:  python3-cups, cups
190BuildRequires:  sane-devel
191BuildRequires:  python3-qt5
192BuildRequires:  libappstream-glib
193BuildRequires:  gsettings-desktop-schemas
194# to force to use Qt5
195BuildConflicts: PyQt
196BuildConflicts: PyQt4
197
198Provides:       hpijs = %{version}-%{release}
199Obsoletes:      hpijs < %{version}-%{release}
200
201%description
202The Hewlett-Packard Linux Imaging and Printing Project provides
203drivers for HP printers and multi-function peripherals.
204
205It supports the DeskJet 350C, 600C, 600C Photo, 630C, Apollo 2000,
206Apollo 2100, Apollo 2560, DeskJet 800C, DeskJet 825, DeskJet 900,
207PhotoSmart, DeskJet 990C, and PhotoSmart 100 series.
208
209%description -l ja
210Hewlett-Packard Linux Imaging and Printing Project は HP 製プリンタ及びプリンタ複合機用のドライバを提供します。
211
212これには DeskJet 350C, 600C, 600C Photo, 630C, Apollo 2000, Apollo 2100, Apollo 2560, DeskJet 800C, DeskJet 825, DeskJet 900, PhotoSmart, DeskJet 990C, and PhotoSmart 100 シリーズ等が含まれます。
213
214#---------------------------------------------------------------------
215
216%package libs
217Summary:        HPLIP libraries
218Summary(ja):    HPLIP ライブラリ
219Group:          System Environment/Libraries
220License:        GPLv2+ and MIT
221Requires:       python3
222
223%description libs
224Libraries needed by HPLIP.
225
226%description libs -l ja
227HPLIP 用のライブラリです。
228
229#---------------------------------------------------------------------
230
231%package gui
232Summary:        HPLIP graphical tools
233Summary(ja):    HPLIP 用 GUI ツール
234Group:          Applications/System
235License:        BSD
236Requires:       %{name} = %{version}-%{release}
237Requires:       python3-qt5
238#Requires:      python3-reportlab
239Requires:       python3-pygobject
240Requires:       %{name}%{?_isa} = %{version}-%{release}
241Requires:       libsane-hpaio%{?_isa} = %{version}-%{release}
242
243%description gui
244HP Device manager (toolbox) is a graphical utility including
245maintenance tools, supplies levels, and status information.
246
247%description gui -l ja
248HP デバイスマネージャ (toolbox) は、各種設定やインクや紙の残量確
249認、ステータス情報の確認が行える HPLIP 用の GUI ユーティリティです。
250
251#---------------------------------------------------------------------
252
253%package -n libsane-hpaio
254Summary:        SANE driver for scanners in HP's multi-function devices
255Summary(ja):    HP 複合機のスキャナ用 SANE ドライバ
256Group:          System Environment/Libraries
257License:        GPLv2+
258Requires:       %{name}-libs = %{version}-%{release}
259Requires:       sane
260
261%description -n libsane-hpaio
262SANE driver for scanners in HP inkjet and laser based multi-function
263printers.
264
265%description -n libsane-hpaio -l ja
266HP インクジェット及びレーザープリンタ複合機のスキャナ機能を利用する
267為の SANE ドライバです。
268
269#---------------------------------------------------------------------
270
271%prep
272%setup -q
273
274# The pstotiff filter is rubbish so replace it (launchpad #528394).
275%patch1 -p1 -b .pstotiff-is-rubbish
276
277# Fix compilation.
278%patch2 -p1 -b .strstr-const
279
280# Make utils.checkPyQtImport() look for the gui sub-package (bug #243273).
281%patch3 -p1 -b .ui-optional
282
283# Make sure to avoid handwritten asm.
284%patch4 -p1 -b .no-asm
285
286# Corrected several IEEE 1284 Device IDs using foomatic data.
287# Color LaserJet 2500 series (bug #659040)
288# LaserJet 4100 Series/2100 Series (bug #659039)
289%patch5 -p1 -b .deviceIDs-drv
290chmod +x %{SOURCE2}
291mv prnt/drv/hpijs.drv.in{,.deviceIDs-drv-hpijs}
292%{SOURCE2} prnt/drv/hpcups.drv.in \
293           prnt/drv/hpijs.drv.in.deviceIDs-drv-hpijs \
294           > prnt/drv/hpijs.drv.in
295
296# Move udev rules from /etc/ to /usr/lib/ (bug #748208).
297%patch6 -p1 -b .udev-rules
298
299# Retry when connecting to device fails (bug #532112).
300%patch7 -p1 -b .retry-open
301
302# Mark SNMP quirks in PPD for HP OfficeJet Pro 8500 (bug #581825).
303%patch8 -p1 -b .snmp-quirks
304
305# Fixed bogus low ink warnings from hpijs driver (bug #643643).
306%patch9 -p1 -b .hpijs-marker-supply
307
308# Clear old printer-state-reasons we used to manage (bug #510926).
309%patch10 -p1 -b .clear-old-state-reasons
310
311# Avoid busy loop in hpcups when backend has exited (bug #525944).
312%patch11 -p1 -b .hpcups-sigpipe
313
314# CUPS filters should use TMPDIR when available (bug #865603).
315%patch12 -p1 -b .logdir
316
317# Fixed Device ID parsing code in hpijs's dj9xxvip.c (bug #510926).
318%patch13 -p1 -b .bad-low-ink-warning
319
320# Add Device ID for
321# HP LaserJet Color M451dn (bug #1159380)
322for ppd_file in $(grep '^diff' %{PATCH14} | cut -d " " -f 4);
323do
324  gunzip ${ppd_file#*/}.gz
325done
326%patch14 -p1 -b .deviceIDs-ppd
327for ppd_file in $(grep '^diff' %{PATCH14} | cut -d " " -f 4);
328do
329  gzip -n ${ppd_file#*/}
330done
331
332# Fix ImageableArea for Laserjet 8150/9000 (bug #596298).
333for ppd_file in $(grep '^diff' %{PATCH15} | cut -d " " -f 4);
334do
335  gunzip ${ppd_file#*/}.gz
336done
337%patch15 -p1 -b .ImageableArea
338for ppd_file in $(grep '^diff' %{PATCH15} | cut -d " " -f 4);
339do
340  gzip -n ${ppd_file#*/}
341done
342
343# Scan to /var/tmp instead of /tmp (bug #1076954).
344%patch16 -p1 -b .scan-tmp
345
346# Treat logging before importing of logger module (bug #984699).
347%patch17 -p1 -b .log-stderr
348
349# Fix parsing of avahi-daemon output (bug #1096939).
350%patch18 -p1 -b .parsing
351
352# Fixed left/right margins for HP DeskJet 990C (LP #1405212).
353%patch20 -p1 -b .dj990c-margin
354
355# Fixed uses of strncpy throughout.
356%patch21 -p1 -b .strncpy
357
358# Don't try to write bytecode cache for hpfax backend (bug #1192761)
359# or hp-config_usb_printer (bug #1266903)
360# or hpps filter (bug #1241548).
361%patch22 -p1 -b .no-write-bytecode
362
363# Ignore IOError when logging output (bug #712537).
364%patch23 -p1 -b .silence-ioerror
365
366# [abrt] hplip: hp-scan:663:<module>:NameError: name 'source_option' is not defined (bug #1341304)
367%patch24 -p1 -b .sourceoption
368
369# hplip license problem (bug #1364711)
370%patch25 -p1 -b .no-ernie
371
372# hplip appdata
373%patch26 -p1 -b .appdata
374
375rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
376
377# hp-check shows 'CUPS incompatible or not running' even if CUPS is running (bug #1456467)
378%patch27 -p1 -b .check-cups
379
380# hp-firmware:NameError: name 'INTERACTIVE_MODE4' is not defined (bug #1533869)
381%patch30 -p1 -b .typo
382
383%patch31 -p1 -b .use-binary-str
384
385# TypeError: 'Error' object does not support indexing (bug #1564770)
386# upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1718129
387# in python2 it was possible to acces Exception message by index [0].
388# in python3 this is no longer possible and it causes TypeError.
389%patch32 -p1 -b .error-print-fix
390
391# TypeError: not all arguments converted during string formatting (bug #1566938)
392# upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/616450
393# bug caused by more arguments than argument specifiers in formatted string
394%patch33 -p1 -b .hpfax-import-error-print
395
396# 'WifiSetupDialog' object has no attribute 'wifiobj' (bug #1626877)
397# upstream bug: https://bugs.launchpad.net/hplip/+bug/1752060
398# bug caused by typo in wifisetupdialog wifiObj property call
399%patch34 -p1 -b .wifisetup-bad-call-fix
400
401# have pool of keyservers to choose
402%patch35 -p1 -b .keyserver
403
404# TypeError: argument 5 has unexpected type 'StandardButtons' (bug #1594602)
405# upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1745383
406# bug caused by typo in QMessageBox constructor call
407# this patch fixes more of those typos - some fixed by tkorbar, some taken from ubuntu fix
408%patch36 -p1 -b .qmsgbox-typos-fix
409
410# removal of non open source code, taken from ubuntu
411%patch37 -p1 -b .libimageprocessor-removal
412
413%__rm prnt/hpcups/libImageProcessor-x86*
414
415%patch38 -p1 -b .toolbox-crash
416# part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076
417%patch39 -p1 -b .add-ppd-crash
418# 1671513 - after 'successful' plugin installation it is not installed
419%patch40 -p1 -b .missing-links
420# 1684434 - Scanning broken for HP LaserJet 3052
421%patch41 -p1 -b .hp-laserjet-3052-broken-scanning
422# 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 1)
423%patch42 -p1 -b .hpmud-string-parse
424# 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 2)
425%patch43 -p1 -b .m278-m281-needs-plugin
426# 1695716 - hpcups crashes in Compressor destructor
427%patch44 -p1 -b .hpcups-crash
428# fixing issues found by coverity scan
429%patch45 -p1 -b .covscan
430# segfault during logging (1727162)
431%patch46 -p1 -b .logging-segfault
432# 1738321 - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily unavailable
433%patch47 -p1 -b .systray-blockerror
434# 1742949, 1740132, 1739855 - missing drivers
435%patch48 -p1 -b .missing-drivers
436# 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat
437%patch49 -p1 -b .model-mismatch
438# 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes
439%patch50 -p1 -b .unicodeerror
440%patch51 -p1 -b .Wreturn-fix
441%patch52 -p1 -b .configure-python
442%patch53 -p1 -b .dialog-infinite-loop
443# 1590014 - hplip PPD search doesn't expect '-' in device name
444%patch54 -p1 -b .find-driver
445# 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error
446%patch55 -p1 -b .clean-ldl
447%patch56 -p1 -b .revert-plugins
448# 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive()
449%patch57 -p1 -b .thread-isalive-removed
450
451# vine
452
453#%patch70 -p1 -b .gksu
454%patch80 -p1 -b .hpijs
455
456sed -i.duplex-constraints \
457    -e 's,\(UIConstraints.* \*Duplex\),//\1,' \
458    prnt/drv/hpcups.drv.in
459
460# Change shebang /usr/bin/env python -> /usr/bin/python3 (bug #618351).
461find -name '*.py' -print0 | xargs -0 \
462    sed -i.env-python -e 's,^#!/usr/bin/env python,#!%{__python3},'
463sed -i.env-python -e 's,^#!/usr/bin/env python,#!%{__python3},' \
464    prnt/filters/hpps \
465    fax/filters/pstotiff
466
467rm locatedriver
468
469cp -p %{SOURCE4} %{SOURCE5} ppd/hpcups
470
471
472%build
473# Work-around Makefile.am imperfections.
474sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in
475touch NEWS README AUTHORS ChangeLog
476autoreconf -fiv
477%configure \
478        --enable-scan-build --enable-gui-build --enable-fax-build \
479        --disable-foomatic-rip-hplip-install --enable-pp-build \
480        --disable-qt4 --enable-qt5 \
481        --enable-hpcups-install --enable-cups-drv-install \
482        --enable-foomatic-drv-install --enable-dbus-build \
483        --enable-hpijs-install \
484        --enable-policykit \
485        --with-mimedir=%{_datadir}/cups/mime \
486        --with-cupsbackenddir=%{_libdir}/cups/backend \
487        --with-cupsfilterdir=%{_libdir}/cups/filter \
488        --with-hpppddir=%{_datadir}/foomatic/db/source/PPD/HP \
489        PYTHON=%{__python3}
490
491make %{?_smp_mflags}
492
493
494%install
495rm -rf $RPM_BUILD_ROOT
496make install DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} rulesdir=/lib/udev/rules.d
497
498# Create /run/hplip & /var/lib/hp
499mkdir -p $RPM_BUILD_ROOT/run/hplip
500mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/hp
501
502# install modified .desktop
503#{__install} -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_datadir}/applications/hplip.desktop
504
505# install /usr/lib/tmpfiles.d/hplip.conf (bug #1015831)
506mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
507cat > $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/hplip.conf <<EOF
508# See tmpfiles.d(5) for details
509
510d /run/hplip 0775 root lp -
511EOF
512
513# remove unpacked files.
514rm -rf  %{buildroot}%{_sysconfdir}/sane.d \
515        %{buildroot}%{_docdir} \
516        %{buildroot}%{_datadir}/hal/fdi \
517        %{buildroot}%{_datadir}/hplip/pkservice.py \
518        %{buildroot}%{_bindir}/hp-pkservice \
519        %{buildroot}%{_datadir}/hplip/locatedriver* \
520        %{buildroot}%{_datadir}/hplip/dat2drv*
521
522rm -f   %{buildroot}%{_bindir}/hp-logcapture \
523        %{buildroot}%{_bindir}/hp-doctor \
524        %{buildroot}%{_bindir}/hp-pqdiag \
525        %{buildroot}%{_datadir}/hplip/logcapture.py \
526        %{buildroot}%{_datadir}/hplip/doctor.py \
527        %{buildroot}%{_datadir}/hplip/pqdiag.py
528
529rm -f   %{buildroot}%{_bindir}/foomatic-rip \
530        %{buildroot}%{_libdir}/cups/filter/foomatic-rip \
531        %{buildroot}%{_libdir}/*.la \
532        %{buildroot}%{python3_sitearch}/*.la \
533        %{buildroot}%{_libdir}/libhpip.so \
534        %{buildroot}%{_libdir}/libhpipp.so \
535        %{buildroot}%{_libdir}/libhpdiscovery.so \
536        %{buildroot}%{_libdir}/sane/*.la \
537        %{buildroot}%{_datadir}/cups/model/foomatic-ppds \
538        %{buildroot}%{_datadir}/applications/hplip.desktop \
539        %{buildroot}%{_datadir}/ppd/HP/*.ppd
540
541mkdir -p %{buildroot}%{_datadir}/metainfo
542cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/
543
544mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,64x64}/apps
545install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/16x16/hp_logo.png \
546   %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/hp_logo.png
547install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/32x32/hp_logo.png \
548   %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/hp_logo.png
549install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/64x64/hp_logo.png \
550   %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/hp_logo.png
551
552mkdir -p %{buildroot}%{_datadir}/applications
553sed -i -e '/^Categories=/d' hplip.desktop
554# Encoding key is deprecated
555sed -i -e '/^Encoding=/d' hplip.desktop
556desktop-file-validate hplip.desktop
557
558desktop-file-install                               \
559        --dir %{buildroot}/%{_datadir}/applications              \
560        --add-category System \
561        --add-category Settings \
562        --add-category HardwareSettings                        \
563        hplip.desktop
564
565appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata.xml
566
567# install hp-uiscan desktop file
568sed -i 's/\/usr\/share\/icons\/Humanity\/devices\/48\/printer\.svg/hp_logo/' hp-uiscan.desktop
569
570# Regenerate hpcups PPDs on upgrade if necessary (bug #579355).
571#install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/hpcups-update-ppds
572
573%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/sane.d/dll.d
574echo hpaio > $RPM_BUILD_ROOT%{_sysconfdir}/sane.d/dll.d/hpaio
575
576# Images in docdir should not be executable (bug #440552).
577find doc/images -type f -exec chmod 644 {} \;
578
579# Create an empty plugins directory to make sure it gets the right
580# SELinux file context (bug #564551).
581%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/hplip/prnt/plugins
582
583# Remove files we don't want to package.
584rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/hpaio.desc
585rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/hplip-install
586rm -rf $RPM_BUILD_ROOT%{_datadir}/hplip/install.*
587rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/uninstall.*
588rm -f $RPM_BUILD_ROOT%{_bindir}/hp-uninstall
589rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/upgrade.*
590rm -f $RPM_BUILD_ROOT%{_bindir}/hp-upgrade
591rm -f $RPM_BUILD_ROOT%{_bindir}/hp-config_usb_printer
592rm -f $RPM_BUILD_ROOT%{_unitdir}/hplip-printer@.service
593rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/config_usb_printer.*
594rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/hpijs.drv.in.template
595rm -f $RPM_BUILD_ROOT%{_datadir}/cups/mime/pstotiff.types
596rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/fax/pstotiff*
597rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/systemd
598
599# The systray applet doesn't work properly (displays icon as a
600# window), so don't ship the launcher yet.
601rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
602
603
604%clean
605rm -rf $RPM_BUILD_ROOT
606
607
608%post libs -p /sbin/ldconfig
609%postun libs -p /sbin/ldconfig
610
611
612%files
613%defattr(-,root,root)
614%doc COPYING doc/*
615#%doc %{_datadir}/doc/%{name}-%{version}
616%{_bindir}/hp-align
617%{_bindir}/hp-clean
618%{_bindir}/hp-colorcal
619%{_bindir}/hp-devicesettings
620%{_bindir}/hp-diagnose_plugin
621%{_bindir}/hp-diagnose_queues
622%{_bindir}/hp-fab
623%{_bindir}/hp-faxsetup
624%{_bindir}/hp-firmware
625%{_bindir}/hp-info
626%{_bindir}/hp-levels
627%{_bindir}/hp-linefeedcal
628%{_bindir}/hp-makecopies
629%{_bindir}/hp-makeuri
630%{_bindir}/hp-plugin
631%{_bindir}/hp-printsettings
632%{_bindir}/hp-probe
633%{_bindir}/hp-query
634%{_bindir}/hp-scan
635%{_bindir}/hp-sendfax
636%{_bindir}/hp-setup
637%{_bindir}/hp-testpage
638%{_bindir}/hp-timedate
639%{_bindir}/hp-unload
640%{_bindir}/hp-wificonfig
641%{_libdir}/cups/backend/hp
642%{_libdir}/cups/backend/hpfax
643%{_libdir}/cups/filter/hpcups
644%{_libdir}/cups/filter/hpcupsfax
645%{_libdir}/cups/filter/hpps
646%{_libdir}/cups/filter/pstotiff
647%{_datadir}/cups/mime/pstotiff.convs
648
649# Files
650%{_datadir}/hplip/align.py*
651%{_datadir}/hplip/check-plugin.py*
652%{_datadir}/hplip/clean.py*
653%{_datadir}/hplip/colorcal.py*
654%{_datadir}/hplip/devicesettings.py*
655%{_datadir}/hplip/diagnose_plugin.py*
656%{_datadir}/hplip/diagnose_queues.py*
657%{_datadir}/hplip/fab.py*
658%{_datadir}/hplip/fax
659%{_datadir}/hplip/faxsetup.py*
660%{_datadir}/hplip/firmware.py*
661%{_datadir}/hplip/hpdio.py*
662%{_datadir}/hplip/hplip_clean.sh
663%{_datadir}/hplip/hpssd*
664%{_datadir}/hplip/info.py*
665%{_datadir}/hplip/__init__.py*
666%{_datadir}/hplip/levels.py*
667%{_datadir}/hplip/linefeedcal.py*
668%{_datadir}/hplip/makecopies.py*
669%{_datadir}/hplip/makeuri.py*
670%{_datadir}/hplip/plugin.py*
671%{_datadir}/hplip/printsettings.py*
672%{_datadir}/hplip/probe.py*
673%{_datadir}/hplip/query.py*
674%{_datadir}/hplip/scan.py*
675%{_datadir}/hplip/sendfax.py*
676%{_datadir}/hplip/setup.py*
677%{_datadir}/hplip/testpage.py*
678%{_datadir}/hplip/timedate.py*
679%{_datadir}/hplip/unload.py*
680%{_datadir}/hplip/wificonfig.py*
681# Directories
682%{_datadir}/hplip/base
683%{_datadir}/hplip/copier
684%{_datadir}/hplip/data/ldl
685%{_datadir}/hplip/data/localization
686%{_datadir}/hplip/data/pcl
687%{_datadir}/hplip/data/ps
688%{_datadir}/hplip/installer
689%{_datadir}/hplip/pcard
690%{_datadir}/hplip/prnt
691%{_datadir}/hplip/scan
692%{_localstatedir}/lib/hp
693%dir %attr(0775,root,lp) /run/hplip
694%{_prefix}/lib/tmpfiles.d/hplip.conf
695
696%dir %{_sysconfdir}/hp
697%config(noreplace) %{_sysconfdir}/hp/hplip.conf
698/lib/udev/rules.d/56-hpmud.rules
699%dir %{_datadir}/hplip
700%dir %{_datadir}/hplip/data
701%{_datadir}/hplip/data/models
702
703%{_bindir}/hpijs
704#{_bindir}/hpcups-update-ppds
705%{_datadir}/cups/drv/*
706%dir %{_datadir}/foomatic/db/source/PPD/HP
707%{_datadir}/foomatic/db/source/PPD/HP/*
708
709%{_sysconfdir}/dbus-1/system.d/com.hp.hplip.conf
710%{_datadir}/dbus-1/system-services/com.hp.hplip.service
711%{_datadir}/polkit-1/actions/com.hp.hplip.policy
712
713%files libs
714%defattr(-,root,root)
715%{_libdir}/libhpip.so.*
716# The so symlink is required here (see bug #489059).
717%{_libdir}/libhpmud.so*
718%{_libdir}/libhpdiscovery.so*
719%{_libdir}/libhpipp.so*
720# Python extension
721%{python3_sitearch}/*
722
723%files gui
724%defattr(-,root,root)
725%{_bindir}/hp-check
726%{_bindir}/hp-print
727%{_bindir}/hp-systray
728%{_bindir}/hp-toolbox
729%{_bindir}/hp-uiscan
730%{_datadir}/applications/*.desktop
731%{_datadir}/metainfo/hplip.appdata.xml
732# Files
733%{_datadir}/icons/hicolor/*/apps/*
734%{_datadir}/hplip/check.py*
735%{_datadir}/hplip/print.py*
736%{_datadir}/hplip/systray.py*
737%{_datadir}/hplip/toolbox.py*
738%{_datadir}/hplip/uiscan.py*
739# Directories
740%{_datadir}/hplip/data/images
741%{_datadir}/hplip/ui5
742%{_datadir}/hplip/uiscan.py*
743%files -n libsane-hpaio
744%defattr(-,root,root)
745%{_libdir}/sane/libsane-hpaio*
746%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
747
748%changelog
749* Thu May 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.18.12-1
750- dropped R:gksu.
751- imported Patche36-47 from rawhide.
752- switched to python3.
753- switched gui to Qt5.
754
755* Wed Nov 07 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.18.10-1
756- new upstream release.
757- updated Patch12.
758- imported Patche24-35 from rawhide.
759
760* Sat Jul 2 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.16.5-1
761- new upstream release.
762- dropped all patches.
763- imported all patches from rawhide.
764- added Patch80 to fix error in building hpijs.
765
766* Sun May 15 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.15.2-2
767- rebuild with openssl-1.0.2
768
769* Thu Mar 19 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.15.2-1
770- updated to 3.15.2
771- updated Source1
772- renumbered former Patch 0 and 1 to Patch 70 and 6
773- built with libusb1
774- added BR: desktop-file-utils
775
776* Wed Mar 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-5
777- rebuild with net-snmp-5.7.1
778
779* Wed Mar 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-5
780- rebuild with net-snmp-5.7.1
781
782* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-4
783- rebuild with python-2.7.2
784
785* Mon Jun 13 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-3
786- add Obsoletes: hpijs < 3.10
787
788* Sun Jun 12 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-2
789- change configure option to --enable-hpijs-install
790- add Provides: hpijs
791- change ppd installation path to %{_datadir}/foomatic/db/source/PPD/HP
792- update Source1 (hplip.desktop.vine)
793- update Patch0 (hplip-3.11.5-gksu.patch)
794- add Patch1 to fix udev old syntax (hplip-udev-rules.patch)
795
796* Tue Mar 15 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-1
797- new upstream release
798- change configure option: disable qt3 and enable qt4
799- add configure option: --enable-foomatic-drv-install
800- add BuildRequires: openssl-devel
801- add Requires: dbus-python
802- add Requires: notify-python (gui)
803- change Requires: PyQt to PyQt4 (gui)
804- add BuildConflicts: PyQt
805- add ppds below %{_datadir}/cups/model/foomatic/hp-*
806  because foomatic (>= 4.0.3) drop PPDs for HP printers.
807
808* Fri Jul 24 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.9.4b-3
809- add Patch0 to require root privilege (via gksu) when adding printer
810- add Requires: gksu
811
812* Mon Jun 08 2009 Shu KONNO <owa@bg.wakwak.com> 3.9.4b-2
813- added --with-cupsfilterdir to configure option
814- use python_sitearch macro instead of python_platlib
815
816* Sun Jun 07 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.9.4b-1
817- new upstream release
818- split libraries to -libs sub package
819- update configure option
820  add --enable-dbus-build, --enable-qt3, --disable-qt4
821
822* Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> 2.7.12-1vl5
823- rebuilt with python-2.5.2
824- added python_platlib macro
825- applied new versioning policy and spec in utf-8
826
827* Sun Jan  6 2008 Shu KONNO <owa@bg.wakwak.com> 2.7.12-0vl2
828- added --with-cupsbackenddir=%%{_libdir}/cups/backend to configure
829
830* Thu Jan  3 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.7.12-0vl1
831- new upstream release
832- build with net-snmp-5.4.1
833
834* Thu Jun 28 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.7.6-0vl1
835- initial build for Vine Linux
Note: See TracBrowser for help on using the repository browser.