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

Revision 12486, 30.3 KB checked in by tomop, 4 years ago (diff)

updated 7 packages

OpenIPMI-2.0.29-1

hplip-3.20.6-2

keepalived-2.1.5-1

net-snmp-5.9-1

php74-7.4.10-2

rsyslog-8.2008.0-1

zabbix-5.0.3-1

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:        2%{?_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}.metainfo.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%debug_package
272
273#---------------------------------------------------------------------
274
275
276%prep
277%setup -q
278
279# The pstotiff filter is rubbish so replace it (launchpad #528394).
280%patch1 -p1 -b .pstotiff-is-rubbish
281
282# Fix compilation.
283%patch2 -p1 -b .strstr-const
284
285# Make utils.checkPyQtImport() look for the gui sub-package (bug #243273).
286%patch3 -p1 -b .ui-optional
287
288# Make sure to avoid handwritten asm.
289%patch4 -p1 -b .no-asm
290
291# Corrected several IEEE 1284 Device IDs using foomatic data.
292# Color LaserJet 2500 series (bug #659040)
293# LaserJet 4100 Series/2100 Series (bug #659039)
294%patch5 -p1 -b .deviceIDs-drv
295chmod +x %{SOURCE2}
296mv prnt/drv/hpijs.drv.in{,.deviceIDs-drv-hpijs}
297%{SOURCE2} prnt/drv/hpcups.drv.in \
298           prnt/drv/hpijs.drv.in.deviceIDs-drv-hpijs \
299           > prnt/drv/hpijs.drv.in
300
301# Move udev rules from /etc/ to /usr/lib/ (bug #748208).
302%patch6 -p1 -b .udev-rules
303
304# Retry when connecting to device fails (bug #532112).
305%patch7 -p1 -b .retry-open
306
307# Mark SNMP quirks in PPD for HP OfficeJet Pro 8500 (bug #581825).
308%patch8 -p1 -b .snmp-quirks
309
310# Fixed bogus low ink warnings from hpijs driver (bug #643643).
311%patch9 -p1 -b .hpijs-marker-supply
312
313# Clear old printer-state-reasons we used to manage (bug #510926).
314%patch10 -p1 -b .clear-old-state-reasons
315
316# Avoid busy loop in hpcups when backend has exited (bug #525944).
317%patch11 -p1 -b .hpcups-sigpipe
318
319# CUPS filters should use TMPDIR when available (bug #865603).
320%patch12 -p1 -b .logdir
321
322# Fixed Device ID parsing code in hpijs's dj9xxvip.c (bug #510926).
323%patch13 -p1 -b .bad-low-ink-warning
324
325# Add Device ID for
326# HP LaserJet Color M451dn (bug #1159380)
327for ppd_file in $(grep '^diff' %{PATCH14} | cut -d " " -f 4);
328do
329  gunzip ${ppd_file#*/}.gz
330done
331%patch14 -p1 -b .deviceIDs-ppd
332for ppd_file in $(grep '^diff' %{PATCH14} | cut -d " " -f 4);
333do
334  gzip -n ${ppd_file#*/}
335done
336
337# Fix ImageableArea for Laserjet 8150/9000 (bug #596298).
338for ppd_file in $(grep '^diff' %{PATCH15} | cut -d " " -f 4);
339do
340  gunzip ${ppd_file#*/}.gz
341done
342%patch15 -p1 -b .ImageableArea
343for ppd_file in $(grep '^diff' %{PATCH15} | cut -d " " -f 4);
344do
345  gzip -n ${ppd_file#*/}
346done
347
348# Scan to /var/tmp instead of /tmp (bug #1076954).
349%patch16 -p1 -b .scan-tmp
350
351# Treat logging before importing of logger module (bug #984699).
352%patch17 -p1 -b .log-stderr
353
354# Fix parsing of avahi-daemon output (bug #1096939).
355%patch18 -p1 -b .parsing
356
357# Fixed left/right margins for HP DeskJet 990C (LP #1405212).
358%patch20 -p1 -b .dj990c-margin
359
360# Fixed uses of strncpy throughout.
361%patch21 -p1 -b .strncpy
362
363# Don't try to write bytecode cache for hpfax backend (bug #1192761)
364# or hp-config_usb_printer (bug #1266903)
365# or hpps filter (bug #1241548).
366%patch22 -p1 -b .no-write-bytecode
367
368# Ignore IOError when logging output (bug #712537).
369%patch23 -p1 -b .silence-ioerror
370
371# [abrt] hplip: hp-scan:663:<module>:NameError: name 'source_option' is not defined (bug #1341304)
372%patch24 -p1 -b .sourceoption
373
374# hplip license problem (bug #1364711)
375%patch25 -p1 -b .no-ernie
376
377# hplip appdata
378%patch26 -p1 -b .appdata
379
380rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
381
382# hp-check shows 'CUPS incompatible or not running' even if CUPS is running (bug #1456467)
383%patch27 -p1 -b .check-cups
384
385# hp-firmware:NameError: name 'INTERACTIVE_MODE4' is not defined (bug #1533869)
386%patch30 -p1 -b .typo
387
388%patch31 -p1 -b .use-binary-str
389
390# TypeError: 'Error' object does not support indexing (bug #1564770)
391# upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1718129
392# in python2 it was possible to acces Exception message by index [0].
393# in python3 this is no longer possible and it causes TypeError.
394%patch32 -p1 -b .error-print-fix
395
396# TypeError: not all arguments converted during string formatting (bug #1566938)
397# upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/616450
398# bug caused by more arguments than argument specifiers in formatted string
399%patch33 -p1 -b .hpfax-import-error-print
400
401# 'WifiSetupDialog' object has no attribute 'wifiobj' (bug #1626877)
402# upstream bug: https://bugs.launchpad.net/hplip/+bug/1752060
403# bug caused by typo in wifisetupdialog wifiObj property call
404%patch34 -p1 -b .wifisetup-bad-call-fix
405
406# have pool of keyservers to choose
407%patch35 -p1 -b .keyserver
408
409# TypeError: argument 5 has unexpected type 'StandardButtons' (bug #1594602)
410# upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1745383
411# bug caused by typo in QMessageBox constructor call
412# this patch fixes more of those typos - some fixed by tkorbar, some taken from ubuntu fix
413%patch36 -p1 -b .qmsgbox-typos-fix
414
415# removal of non open source code, taken from ubuntu
416%patch37 -p1 -b .libimageprocessor-removal
417
418%__rm prnt/hpcups/libImageProcessor-x86*
419
420%patch38 -p1 -b .toolbox-crash
421# part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076
422%patch39 -p1 -b .add-ppd-crash
423# 1671513 - after 'successful' plugin installation it is not installed
424%patch40 -p1 -b .missing-links
425# 1684434 - Scanning broken for HP LaserJet 3052
426%patch41 -p1 -b .hp-laserjet-3052-broken-scanning
427# 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 1)
428%patch42 -p1 -b .hpmud-string-parse
429# 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 2)
430%patch43 -p1 -b .m278-m281-needs-plugin
431# 1695716 - hpcups crashes in Compressor destructor
432%patch44 -p1 -b .hpcups-crash
433# fixing issues found by coverity scan
434%patch45 -p1 -b .covscan
435# segfault during logging (1727162)
436%patch46 -p1 -b .logging-segfault
437# 1738321 - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily unavailable
438%patch47 -p1 -b .systray-blockerror
439# 1742949, 1740132, 1739855 - missing drivers
440%patch48 -p1 -b .missing-drivers
441# 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat
442%patch49 -p1 -b .model-mismatch
443# 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes
444%patch50 -p1 -b .unicodeerror
445%patch51 -p1 -b .Wreturn-fix
446%patch52 -p1 -b .configure-python
447%patch53 -p1 -b .dialog-infinite-loop
448# 1590014 - hplip PPD search doesn't expect '-' in device name
449%patch54 -p1 -b .find-driver
450# 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error
451%patch55 -p1 -b .clean-ldl
452%patch56 -p1 -b .revert-plugins
453# 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive()
454%patch57 -p1 -b .thread-isalive-removed
455
456# vine
457
458#%patch70 -p1 -b .gksu
459%patch80 -p1 -b .hpijs
460
461sed -i.duplex-constraints \
462    -e 's,\(UIConstraints.* \*Duplex\),//\1,' \
463    prnt/drv/hpcups.drv.in
464
465# Change shebang /usr/bin/env python -> /usr/bin/python3 (bug #618351).
466find -name '*.py' -print0 | xargs -0 \
467    sed -i.env-python -e 's,^#!/usr/bin/env python,#!%{__python3},'
468sed -i.env-python -e 's,^#!/usr/bin/env python,#!%{__python3},' \
469    prnt/filters/hpps \
470    fax/filters/pstotiff
471
472rm locatedriver
473
474cp -p %{SOURCE4} %{SOURCE5} ppd/hpcups
475
476
477%build
478# Work-around Makefile.am imperfections.
479sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in
480touch NEWS README AUTHORS ChangeLog
481autoreconf -fiv
482%configure \
483        --enable-scan-build --enable-gui-build --enable-fax-build \
484        --disable-foomatic-rip-hplip-install --enable-pp-build \
485        --disable-qt4 --enable-qt5 \
486        --enable-hpcups-install --enable-cups-drv-install \
487        --enable-foomatic-drv-install --enable-dbus-build \
488        --enable-hpijs-install \
489        --enable-policykit \
490        --with-mimedir=%{_datadir}/cups/mime \
491        --with-cupsbackenddir=%{_libdir}/cups/backend \
492        --with-cupsfilterdir=%{_libdir}/cups/filter \
493        --with-hpppddir=%{_datadir}/foomatic/db/source/PPD/HP \
494        PYTHON=%{__python3}
495
496make %{?_smp_mflags}
497
498
499%install
500rm -rf $RPM_BUILD_ROOT
501make install DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} rulesdir=/lib/udev/rules.d
502
503# Create /run/hplip & /var/lib/hp
504mkdir -p $RPM_BUILD_ROOT/run/hplip
505mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/hp
506
507# install modified .desktop
508#{__install} -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_datadir}/applications/hplip.desktop
509
510# install /usr/lib/tmpfiles.d/hplip.conf (bug #1015831)
511mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
512cat > $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/hplip.conf <<EOF
513# See tmpfiles.d(5) for details
514
515d /run/hplip 0775 root lp -
516EOF
517
518# remove unpacked files.
519rm -rf  %{buildroot}%{_sysconfdir}/sane.d \
520        %{buildroot}%{_docdir} \
521        %{buildroot}%{_datadir}/hal/fdi \
522        %{buildroot}%{_datadir}/hplip/pkservice.py \
523        %{buildroot}%{_bindir}/hp-pkservice \
524        %{buildroot}%{_datadir}/hplip/locatedriver* \
525        %{buildroot}%{_datadir}/hplip/dat2drv*
526
527rm -f   %{buildroot}%{_bindir}/hp-logcapture \
528        %{buildroot}%{_bindir}/hp-doctor \
529        %{buildroot}%{_bindir}/hp-pqdiag \
530        %{buildroot}%{_datadir}/hplip/logcapture.py \
531        %{buildroot}%{_datadir}/hplip/doctor.py \
532        %{buildroot}%{_datadir}/hplip/pqdiag.py
533
534rm -f   %{buildroot}%{_bindir}/foomatic-rip \
535        %{buildroot}%{_libdir}/cups/filter/foomatic-rip \
536        %{buildroot}%{_libdir}/*.la \
537        %{buildroot}%{python3_sitearch}/*.la \
538        %{buildroot}%{_libdir}/libhpip.so \
539        %{buildroot}%{_libdir}/libhpipp.so \
540        %{buildroot}%{_libdir}/libhpdiscovery.so \
541        %{buildroot}%{_libdir}/sane/*.la \
542        %{buildroot}%{_datadir}/cups/model/foomatic-ppds \
543        %{buildroot}%{_datadir}/applications/hplip.desktop \
544        %{buildroot}%{_datadir}/ppd/HP/*.ppd
545
546mkdir -p %{buildroot}%{_datadir}/metainfo
547cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/
548
549mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,64x64}/apps
550install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/16x16/hp_logo.png \
551   %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/hp_logo.png
552install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/32x32/hp_logo.png \
553   %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/hp_logo.png
554install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/64x64/hp_logo.png \
555   %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/hp_logo.png
556
557mkdir -p %{buildroot}%{_datadir}/applications
558sed -i -e '/^Categories=/d' hplip.desktop
559# Encoding key is deprecated
560sed -i -e '/^Encoding=/d' hplip.desktop
561desktop-file-validate hplip.desktop
562
563desktop-file-install                               \
564        --dir %{buildroot}/%{_datadir}/applications              \
565        --add-category System \
566        --add-category Settings \
567        --add-category HardwareSettings                        \
568        hplip.desktop
569
570appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
571
572# install hp-uiscan desktop file
573sed -i 's/\/usr\/share\/icons\/Humanity\/devices\/48\/printer\.svg/hp_logo/' hp-uiscan.desktop
574
575# Regenerate hpcups PPDs on upgrade if necessary (bug #579355).
576#install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/hpcups-update-ppds
577
578%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/sane.d/dll.d
579echo hpaio > $RPM_BUILD_ROOT%{_sysconfdir}/sane.d/dll.d/hpaio
580
581# Images in docdir should not be executable (bug #440552).
582find doc/images -type f -exec chmod 644 {} \;
583
584# Create an empty plugins directory to make sure it gets the right
585# SELinux file context (bug #564551).
586%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/hplip/prnt/plugins
587
588# Remove files we don't want to package.
589rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/hpaio.desc
590rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/hplip-install
591rm -rf $RPM_BUILD_ROOT%{_datadir}/hplip/install.*
592rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/uninstall.*
593rm -f $RPM_BUILD_ROOT%{_bindir}/hp-uninstall
594rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/upgrade.*
595rm -f $RPM_BUILD_ROOT%{_bindir}/hp-upgrade
596rm -f $RPM_BUILD_ROOT%{_bindir}/hp-config_usb_printer
597rm -f $RPM_BUILD_ROOT%{_unitdir}/hplip-printer@.service
598rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/config_usb_printer.*
599rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/hpijs.drv.in.template
600rm -f $RPM_BUILD_ROOT%{_datadir}/cups/mime/pstotiff.types
601rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/fax/pstotiff*
602rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/systemd
603
604# The systray applet doesn't work properly (displays icon as a
605# window), so don't ship the launcher yet.
606rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
607
608
609%clean
610rm -rf $RPM_BUILD_ROOT
611
612
613%post libs -p /sbin/ldconfig
614%postun libs -p /sbin/ldconfig
615
616
617%files
618%defattr(-,root,root)
619%doc COPYING doc/*
620#%doc %{_datadir}/doc/%{name}-%{version}
621%{_bindir}/hp-align
622%{_bindir}/hp-clean
623%{_bindir}/hp-colorcal
624%{_bindir}/hp-devicesettings
625%{_bindir}/hp-diagnose_plugin
626%{_bindir}/hp-diagnose_queues
627%{_bindir}/hp-fab
628%{_bindir}/hp-faxsetup
629%{_bindir}/hp-firmware
630%{_bindir}/hp-info
631%{_bindir}/hp-levels
632%{_bindir}/hp-linefeedcal
633%{_bindir}/hp-makecopies
634%{_bindir}/hp-makeuri
635%{_bindir}/hp-plugin
636%{_bindir}/hp-printsettings
637%{_bindir}/hp-probe
638%{_bindir}/hp-query
639%{_bindir}/hp-scan
640%{_bindir}/hp-sendfax
641%{_bindir}/hp-setup
642%{_bindir}/hp-testpage
643%{_bindir}/hp-timedate
644%{_bindir}/hp-unload
645%{_bindir}/hp-wificonfig
646%{_libdir}/cups/backend/hp
647%{_libdir}/cups/backend/hpfax
648%{_libdir}/cups/filter/hpcups
649%{_libdir}/cups/filter/hpcupsfax
650%{_libdir}/cups/filter/hpps
651%{_libdir}/cups/filter/pstotiff
652%{_datadir}/cups/mime/pstotiff.convs
653
654# Files
655%{_datadir}/hplip/align.py*
656%{_datadir}/hplip/check-plugin.py*
657%{_datadir}/hplip/clean.py*
658%{_datadir}/hplip/colorcal.py*
659%{_datadir}/hplip/devicesettings.py*
660%{_datadir}/hplip/diagnose_plugin.py*
661%{_datadir}/hplip/diagnose_queues.py*
662%{_datadir}/hplip/fab.py*
663%{_datadir}/hplip/fax
664%{_datadir}/hplip/faxsetup.py*
665%{_datadir}/hplip/firmware.py*
666%{_datadir}/hplip/hpdio.py*
667%{_datadir}/hplip/hplip_clean.sh
668%{_datadir}/hplip/hpssd*
669%{_datadir}/hplip/info.py*
670%{_datadir}/hplip/__init__.py*
671%{_datadir}/hplip/levels.py*
672%{_datadir}/hplip/linefeedcal.py*
673%{_datadir}/hplip/makecopies.py*
674%{_datadir}/hplip/makeuri.py*
675%{_datadir}/hplip/plugin.py*
676%{_datadir}/hplip/printsettings.py*
677%{_datadir}/hplip/probe.py*
678%{_datadir}/hplip/query.py*
679%{_datadir}/hplip/scan.py*
680%{_datadir}/hplip/sendfax.py*
681%{_datadir}/hplip/setup.py*
682%{_datadir}/hplip/testpage.py*
683%{_datadir}/hplip/timedate.py*
684%{_datadir}/hplip/unload.py*
685%{_datadir}/hplip/wificonfig.py*
686# Directories
687%{_datadir}/hplip/base
688%{_datadir}/hplip/copier
689%{_datadir}/hplip/data/ldl
690%{_datadir}/hplip/data/localization
691%{_datadir}/hplip/data/pcl
692%{_datadir}/hplip/data/ps
693%{_datadir}/hplip/installer
694%{_datadir}/hplip/pcard
695%{_datadir}/hplip/prnt
696%{_datadir}/hplip/scan
697%{_localstatedir}/lib/hp
698%dir %attr(0775,root,lp) /run/hplip
699%{_prefix}/lib/tmpfiles.d/hplip.conf
700
701%dir %{_sysconfdir}/hp
702%config(noreplace) %{_sysconfdir}/hp/hplip.conf
703/lib/udev/rules.d/56-hpmud.rules
704%dir %{_datadir}/hplip
705%dir %{_datadir}/hplip/data
706%{_datadir}/hplip/data/models
707
708%{_bindir}/hpijs
709#{_bindir}/hpcups-update-ppds
710%{_datadir}/cups/drv/*
711%dir %{_datadir}/foomatic/db/source/PPD/HP
712%{_datadir}/foomatic/db/source/PPD/HP/*
713
714%{_sysconfdir}/dbus-1/system.d/com.hp.hplip.conf
715%{_datadir}/dbus-1/system-services/com.hp.hplip.service
716%{_datadir}/polkit-1/actions/com.hp.hplip.policy
717
718%files libs
719%defattr(-,root,root)
720%{_libdir}/libhpip.so.*
721# The so symlink is required here (see bug #489059).
722%{_libdir}/libhpmud.so*
723%{_libdir}/libhpdiscovery.so*
724%{_libdir}/libhpipp.so*
725# Python extension
726%{python3_sitearch}/*
727
728%files gui
729%defattr(-,root,root)
730%{_bindir}/hp-check
731%{_bindir}/hp-print
732%{_bindir}/hp-systray
733%{_bindir}/hp-toolbox
734%{_bindir}/hp-uiscan
735%{_datadir}/applications/*.desktop
736%{_datadir}/metainfo/hplip.metainfo.xml
737# Files
738%{_datadir}/icons/hicolor/*/apps/*
739%{_datadir}/hplip/check.py*
740%{_datadir}/hplip/print.py*
741%{_datadir}/hplip/systray.py*
742%{_datadir}/hplip/toolbox.py*
743%{_datadir}/hplip/uiscan.py*
744# Directories
745%{_datadir}/hplip/data/images
746%{_datadir}/hplip/ui5
747%{_datadir}/hplip/uiscan.py*
748%files -n libsane-hpaio
749%defattr(-,root,root)
750%{_libdir}/sane/libsane-hpaio*
751%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
752
753%changelog
754* Tue Sep 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.20.6-2
755- rebuilt with net-snmp-5.9.
756
757* Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.20.6-1
758- new upstream release.
759
760* Thu May 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.18.12-1
761- dropped R:gksu.
762- imported Patche36-47 from rawhide.
763- switched to python3.
764- switched gui to Qt5.
765
766* Wed Nov 07 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.18.10-1
767- new upstream release.
768- updated Patch12.
769- imported Patche24-35 from rawhide.
770
771* Sat Jul 2 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.16.5-1
772- new upstream release.
773- dropped all patches.
774- imported all patches from rawhide.
775- added Patch80 to fix error in building hpijs.
776
777* Sun May 15 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.15.2-2
778- rebuild with openssl-1.0.2
779
780* Thu Mar 19 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.15.2-1
781- updated to 3.15.2
782- updated Source1
783- renumbered former Patch 0 and 1 to Patch 70 and 6
784- built with libusb1
785- added BR: desktop-file-utils
786
787* Wed Mar 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-5
788- rebuild with net-snmp-5.7.1
789
790* Wed Mar 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-5
791- rebuild with net-snmp-5.7.1
792
793* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-4
794- rebuild with python-2.7.2
795
796* Mon Jun 13 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-3
797- add Obsoletes: hpijs < 3.10
798
799* Sun Jun 12 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-2
800- change configure option to --enable-hpijs-install
801- add Provides: hpijs
802- change ppd installation path to %{_datadir}/foomatic/db/source/PPD/HP
803- update Source1 (hplip.desktop.vine)
804- update Patch0 (hplip-3.11.5-gksu.patch)
805- add Patch1 to fix udev old syntax (hplip-udev-rules.patch)
806
807* Tue Mar 15 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-1
808- new upstream release
809- change configure option: disable qt3 and enable qt4
810- add configure option: --enable-foomatic-drv-install
811- add BuildRequires: openssl-devel
812- add Requires: dbus-python
813- add Requires: notify-python (gui)
814- change Requires: PyQt to PyQt4 (gui)
815- add BuildConflicts: PyQt
816- add ppds below %{_datadir}/cups/model/foomatic/hp-*
817  because foomatic (>= 4.0.3) drop PPDs for HP printers.
818
819* Fri Jul 24 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.9.4b-3
820- add Patch0 to require root privilege (via gksu) when adding printer
821- add Requires: gksu
822
823* Mon Jun 08 2009 Shu KONNO <owa@bg.wakwak.com> 3.9.4b-2
824- added --with-cupsfilterdir to configure option
825- use python_sitearch macro instead of python_platlib
826
827* Sun Jun 07 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.9.4b-1
828- new upstream release
829- split libraries to -libs sub package
830- update configure option
831  add --enable-dbus-build, --enable-qt3, --disable-qt4
832
833* Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> 2.7.12-1vl5
834- rebuilt with python-2.5.2
835- added python_platlib macro
836- applied new versioning policy and spec in utf-8
837
838* Sun Jan  6 2008 Shu KONNO <owa@bg.wakwak.com> 2.7.12-0vl2
839- added --with-cupsbackenddir=%%{_libdir}/cups/backend to configure
840
841* Thu Jan  3 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.7.12-0vl1
842- new upstream release
843- build with net-snmp-5.4.1
844
845* Thu Jun 28 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.7.6-0vl1
846- initial build for Vine Linux
Note: See TracBrowser for help on using the repository browser.