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

Revision 12119, 26.3 KB checked in by tomop, 5 years ago (diff)

Merge branch 'tomop'

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