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

RevLine 
[521]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
[9445]3Summary(ja):    HP プリンタの Linux 向けドライバとユーティリティ
[521]4Name:           hplip
[12469]5Version:        3.20.6
[12486]6Release:        2%{?_dist_release}
[12469]7Vendor:         Project Vine
8Distribution:   Vine Linux
9Packager:       kazutaka
[9445]10
11License:        GPLv2+, MIT and BSD
[521]12Group:          Applications/Publishing
[12119]13URL:            https://developers.hp.com/hp-linux-imaging-and-printing
[521]14
[9445]15Source0:        http://downloads.sourceforge.net/sourceforge/hplip/hplip-%{version}.tar.gz
16#Source1:       hpcups-update-ppds.sh
17Source2:        copy-deviceids.py
[12486]18Source3:        %{name}.metainfo.xml
[12469]19Source4:        hp-laserjet_cp_1025nw.ppd.gz
20Source5:        hp-laserjet_professional_p_1102w.ppd.gz
[10497]21Source1000:     hplip.desktop.vine
[9445]22
[12469]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
[11877]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
[12469]56Patch32: hplip-error-print.patch
57Patch33: hplip-hpfax-importerror-print.patch
58Patch34: hplip-wifisetup.patch
[12119]59# pgp.mit.edu keyserver got bad connection, so we need to have pool of keyservers
60# to choose (Bz#1641100, launchpad#1799212)
[12469]61Patch35: hplip-keyserver.patch
[12119]62# QMessagebox call was copy-pasted from Qt4 version, but Qt5 has different arguments,
63# This patch solves most of them
[12469]64Patch36: 0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch
[12119]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.
[12469]68Patch37: 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
[12119]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.
[12469]73Patch38: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch
[12119]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
[12469]79Patch39: hplip-add-ppd-crash.patch
[12119]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
[12469]88Patch40: hplip-missing-links.patch
[12119]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.
[12469]93Patch41: hplip-hplj-3052.patch
[12119]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
[12469]100Patch42: hplip-hpmud-string-parse.patch
[12119]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
[12469]104Patch43: hplip-m278-m281-needs-plugin.patch
[12119]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
[12469]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
[9445]167
168# Vine Patches
169Patch70:        hplip-3.11.5-gksu.patch
[10497]170Patch80:        hplip-3.16.5-hpijs.patch
[9445]171
172BuildRoot:      %{_tmppath}/%{name}-%{version}-root
[4119]173Requires:       cups
174Requires:       dbus
[12119]175Requires:       dbus-python3
[4119]176Requires:       foomatic
177Requires:       ghostscript
178Requires:       openssl
[521]179Requires:       %{name}-libs = %{version}-%{release}
[4119]180BuildRequires:  cups-devel
[521]181BuildRequires:  dbus-devel
[9445]182BuildRequires:  desktop-file-utils
183BuildRequires:  libusb1-devel
[4119]184BuildRequires:  libjpeg-devel
185BuildRequires:  net-snmp-devel
186BuildRequires:  openssl-devel
[12119]187BuildRequires:  python3-devel
188BuildRequires:  python3-rpm-macros
189BuildRequires:  python3-cups, cups
[4119]190BuildRequires:  sane-devel
[12119]191BuildRequires:  python3-qt5
[12469]192BuildRequires:  libappstream-glib
193BuildRequires:  gsettings-desktop-schemas
[12119]194# to force to use Qt5
[4119]195BuildConflicts: PyQt
[12119]196BuildConflicts: PyQt4
[4158]197
[9445]198Provides:       hpijs = %{version}-%{release}
199Obsoletes:      hpijs < %{version}-%{release}
[4158]200
[521]201%description
[9445]202The Hewlett-Packard Linux Imaging and Printing Project provides
203drivers for HP printers and multi-function peripherals.
[521]204
[9445]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.
[521]208
209%description -l ja
[9445]210Hewlett-Packard Linux Imaging and Printing Project は HP 製プリンタ及びプリンタ複合機用のドライバを提供します。
[521]211
[9445]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 シリーズ等が含まれます。
[521]213
214#---------------------------------------------------------------------
215
216%package libs
217Summary:        HPLIP libraries
218Summary(ja):    HPLIP ライブラリ
219Group:          System Environment/Libraries
[9445]220License:        GPLv2+ and MIT
221Requires:       python3
[521]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
[9445]235License:        BSD
[4119]236Requires:       %{name} = %{version}-%{release}
[12119]237Requires:       python3-qt5
238#Requires:      python3-reportlab
239Requires:       python3-pygobject
240Requires:       %{name}%{?_isa} = %{version}-%{release}
241Requires:       libsane-hpaio%{?_isa} = %{version}-%{release}
[521]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
[9445]257License:        GPLv2+
[4119]258Requires:       %{name}-libs = %{version}-%{release}
259Requires:       sane
[521]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
[12486]271%debug_package
272
273#---------------------------------------------------------------------
274
275
[521]276%prep
277%setup -q
278
[9445]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
[10497]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).
[9445]366%patch22 -p1 -b .no-write-bytecode
367
368# Ignore IOError when logging output (bug #712537).
369%patch23 -p1 -b .silence-ioerror
370
[11877]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.
[12469]394%patch32 -p1 -b .error-print-fix
[11877]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
[12469]399%patch33 -p1 -b .hpfax-import-error-print
[11877]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
[12469]404%patch34 -p1 -b .wifisetup-bad-call-fix
[11877]405
[12119]406# have pool of keyservers to choose
[12469]407%patch35 -p1 -b .keyserver
[12119]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
[12469]413%patch36 -p1 -b .qmsgbox-typos-fix
[12119]414
[12469]415# removal of non open source code, taken from ubuntu
416%patch37 -p1 -b .libimageprocessor-removal
[12119]417
[12469]418%__rm prnt/hpcups/libImageProcessor-x86*
419
420%patch38 -p1 -b .toolbox-crash
[12119]421# part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076
[12469]422%patch39 -p1 -b .add-ppd-crash
[12119]423# 1671513 - after 'successful' plugin installation it is not installed
[12469]424%patch40 -p1 -b .missing-links
[12119]425# 1684434 - Scanning broken for HP LaserJet 3052
[12469]426%patch41 -p1 -b .hp-laserjet-3052-broken-scanning
[12119]427# 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 1)
[12469]428%patch42 -p1 -b .hpmud-string-parse
[12119]429# 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 2)
[12469]430%patch43 -p1 -b .m278-m281-needs-plugin
[12119]431# 1695716 - hpcups crashes in Compressor destructor
[12469]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
[12119]455
[11877]456# vine
457
[12119]458#%patch70 -p1 -b .gksu
[10497]459%patch80 -p1 -b .hpijs
[9445]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).
[12119]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
[9445]471
[11877]472rm locatedriver
473
[12469]474cp -p %{SOURCE4} %{SOURCE5} ppd/hpcups
475
476
[521]477%build
[12469]478# Work-around Makefile.am imperfections.
479sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in
[10497]480touch NEWS README AUTHORS ChangeLog
[12469]481autoreconf -fiv
[9445]482%configure \
483        --enable-scan-build --enable-gui-build --enable-fax-build \
484        --disable-foomatic-rip-hplip-install --enable-pp-build \
[12119]485        --disable-qt4 --enable-qt5 \
[11877]486        --enable-hpcups-install --enable-cups-drv-install \
[9445]487        --enable-foomatic-drv-install --enable-dbus-build \
488        --enable-hpijs-install \
[12119]489        --enable-policykit \
[9445]490        --with-mimedir=%{_datadir}/cups/mime \
491        --with-cupsbackenddir=%{_libdir}/cups/backend \
492        --with-cupsfilterdir=%{_libdir}/cups/filter \
[12119]493        --with-hpppddir=%{_datadir}/foomatic/db/source/PPD/HP \
494        PYTHON=%{__python3}
[521]495
[12119]496make %{?_smp_mflags}
[9445]497
498
[521]499%install
[9445]500rm -rf $RPM_BUILD_ROOT
[12469]501make install DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} rulesdir=/lib/udev/rules.d
[521]502
[10497]503# Create /run/hplip & /var/lib/hp
[9445]504mkdir -p $RPM_BUILD_ROOT/run/hplip
[10497]505mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/hp
[9445]506
[521]507# install modified .desktop
[9445]508#{__install} -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_datadir}/applications/hplip.desktop
[521]509
[9445]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
[521]518# remove unpacked files.
[11877]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*
[521]526
[11877]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
[521]533
[11877]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
[521]545
[12469]546mkdir -p %{buildroot}%{_datadir}/metainfo
547cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/
[11877]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
[12469]557mkdir -p %{buildroot}%{_datadir}/applications
[9445]558sed -i -e '/^Categories=/d' hplip.desktop
559# Encoding key is deprecated
560sed -i -e '/^Encoding=/d' hplip.desktop
[12469]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                        \
[9445]568        hplip.desktop
[521]569
[12486]570appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
[12469]571
572# install hp-uiscan desktop file
573sed -i 's/\/usr\/share\/icons\/Humanity\/devices\/48\/printer\.svg/hp_logo/' hp-uiscan.desktop
574
[9445]575# Regenerate hpcups PPDs on upgrade if necessary (bug #579355).
576#install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/hpcups-update-ppds
[521]577
[9445]578%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/sane.d/dll.d
579echo hpaio > $RPM_BUILD_ROOT%{_sysconfdir}/sane.d/dll.d/hpaio
[4119]580
[9445]581# Images in docdir should not be executable (bug #440552).
582find doc/images -type f -exec chmod 644 {} \;
[521]583
[9445]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
[521]587
[9445]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
[521]603
[9445]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
[12469]616
[521]617%files
618%defattr(-,root,root)
[9445]619%doc COPYING doc/*
620#%doc %{_datadir}/doc/%{name}-%{version}
[521]621%{_bindir}/hp-align
622%{_bindir}/hp-clean
623%{_bindir}/hp-colorcal
[4119]624%{_bindir}/hp-devicesettings
[9445]625%{_bindir}/hp-diagnose_plugin
626%{_bindir}/hp-diagnose_queues
[521]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
[4119]645%{_bindir}/hp-wificonfig
[9445]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
[521]687%{_datadir}/hplip/base
688%{_datadir}/hplip/copier
689%{_datadir}/hplip/data/ldl
[9445]690%{_datadir}/hplip/data/localization
[521]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
[9445]698%dir %attr(0775,root,lp) /run/hplip
699%{_prefix}/lib/tmpfiles.d/hplip.conf
[521]700
[9445]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
[12119]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
[521]718%files libs
719%defattr(-,root,root)
[9445]720%{_libdir}/libhpip.so.*
721# The so symlink is required here (see bug #489059).
[521]722%{_libdir}/libhpmud.so*
[10497]723%{_libdir}/libhpdiscovery.so*
724%{_libdir}/libhpipp.so*
[9445]725# Python extension
[12119]726%{python3_sitearch}/*
[521]727
728%files gui
729%defattr(-,root,root)
[9445]730%{_bindir}/hp-check
[521]731%{_bindir}/hp-print
[9445]732%{_bindir}/hp-systray
[521]733%{_bindir}/hp-toolbox
[11877]734%{_bindir}/hp-uiscan
[9445]735%{_datadir}/applications/*.desktop
[12486]736%{_datadir}/metainfo/hplip.metainfo.xml
[9445]737# Files
[11877]738%{_datadir}/icons/hicolor/*/apps/*
[9445]739%{_datadir}/hplip/check.py*
740%{_datadir}/hplip/print.py*
741%{_datadir}/hplip/systray.py*
742%{_datadir}/hplip/toolbox.py*
[11877]743%{_datadir}/hplip/uiscan.py*
[9445]744# Directories
[521]745%{_datadir}/hplip/data/images
[12119]746%{_datadir}/hplip/ui5
[11877]747%{_datadir}/hplip/uiscan.py*
[521]748%files -n libsane-hpaio
749%defattr(-,root,root)
750%{_libdir}/sane/libsane-hpaio*
[9445]751%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
[521]752
[9445]753%changelog
[12486]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
[12119]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
[11877]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
[10497]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
[10291]777* Sun May 15 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.15.2-2
778- rebuild with openssl-1.0.2
779
[9445]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
[521]786
[5849]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
[9445]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
[5701]793* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-4
794- rebuild with python-2.7.2
795
[4158]796* Mon Jun 13 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-3
797- add Obsoletes: hpijs < 3.10
798
[4127]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
[4119]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
[521]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.