123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846 |
- # %define python_platlib %(python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)')
- Summary: HP printer drivers & utilities for Linux
- Summary(ja): HP プリンタの Linux 向けドライバとユーティリティ
- Name: hplip
- Version: 3.20.6
- Release: 2%{?_dist_release}
- Vendor: Project Vine
- Distribution: Vine Linux
- Packager: kazutaka
- License: GPLv2+, MIT and BSD
- Group: Applications/Publishing
- URL: https://developers.hp.com/hp-linux-imaging-and-printing
- Source0: http://downloads.sourceforge.net/sourceforge/hplip/hplip-%{version}.tar.gz
- #Source1: hpcups-update-ppds.sh
- Source2: copy-deviceids.py
- Source3: %{name}.metainfo.xml
- Source4: hp-laserjet_cp_1025nw.ppd.gz
- Source5: hp-laserjet_professional_p_1102w.ppd.gz
- Source1000: hplip.desktop.vine
- Patch1: hplip-pstotiff-is-rubbish.patch
- Patch2: hplip-strstr-const.patch
- Patch3: hplip-ui-optional.patch
- Patch4: hplip-no-asm.patch
- Patch5: hplip-deviceIDs-drv.patch
- Patch6: hplip-udev-rules.patch
- Patch7: hplip-retry-open.patch
- Patch8: hplip-snmp-quirks.patch
- Patch9: hplip-hpijs-marker-supply.patch
- Patch10: hplip-clear-old-state-reasons.patch
- Patch11: hplip-hpcups-sigpipe.patch
- Patch12: hplip-logdir.patch
- Patch13: hplip-bad-low-ink-warning.patch
- Patch14: hplip-deviceIDs-ppd.patch
- Patch15: hplip-ppd-ImageableArea.patch
- Patch16: hplip-scan-tmp.patch
- Patch17: hplip-log-stderr.patch
- Patch18: hplip-avahi-parsing.patch
- Patch20: hplip-dj990c-margin.patch
- Patch21: hplip-strncpy.patch
- Patch22: hplip-no-write-bytecode.patch
- Patch23: hplip-silence-ioerror.patch
- Patch24: hplip-3165-sourceoption.patch
- Patch25: hplip-noernie.patch
- Patch26: hplip-appdata.patch
- Patch27: hplip-check-cups.patch
- Patch30: hplip-typo.patch
- # python3 - recent HP release removed encoding/decoding to utf-8 in fax/pmlfax.py -
- # that results in text string going into translate function in base/utils.py, which
- # expects binary string because of parameters. Remove this patch if base/utils.py
- # code gets fixed.
- Patch31: hplip-use-binary-str.patch
- # m278-m281 doesn't work correctly again
- Patch32: hplip-error-print.patch
- Patch33: hplip-hpfax-importerror-print.patch
- Patch34: hplip-wifisetup.patch
- # pgp.mit.edu keyserver got bad connection, so we need to have pool of keyservers
- # to choose (Bz#1641100, launchpad#1799212)
- Patch35: hplip-keyserver.patch
- # QMessagebox call was copy-pasted from Qt4 version, but Qt5 has different arguments,
- # This patch solves most of them
- Patch36: 0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch
- # HP upstream introduced new binary blob, which is not open-source, so it violates
- # FPG by two ways - shipping binary blob and non open source code - so it needs to be removed.
- # Patch is taken from Debian.
- Patch37: 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
- # In hplip-3.18.10 some parts of UI code was commented out, which leaved hp-toolbox
- # unusable (crashed on the start). The patch removes usages of variables, which were
- # commented out.
- # The patch is taken from Debian.
- Patch38: 0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch
- # hp-setup crashed when user wanted to define a path to PPD file. It was due
- # byte + string variables incompatibility and it is fixed by decoding the
- # bytes-like variable
- # part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076
- # reported upstream https://bugs.launchpad.net/hplip/+bug/1814272
- Patch39: hplip-add-ppd-crash.patch
- # external scripts, which are downloaded and run by hp-plugin, try to create links
- # in non-existing dirs. These scripts ignore errors, so plugin is installed fine
- # but then internal hp-plugin can check for plugin state, where links are checked too.
- # It results in corrupted plugin state, which breaks printer installation by GUI hp-setup.
- # Temporary workaround is to ignore these bad links and real fix should come from HP,
- # because their external scripts try to create links in non-existing dirs.
- # Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1671513
- # Reported upstream: https://bugs.launchpad.net/hplip/+bug/1814574
- Patch40: hplip-missing-links.patch
- # change in 3.18.9 in scanext.c caused broken scanning for HP LaserJet 3052. Since I cannot figure
- # it out what author wanted by the change (it sets option number 9 to true, but different handles
- # have different options, so I'm not sure what author wanted to set).
- # Remove the change for now, it works for user and me.
- Patch41: hplip-hplj-3052.patch
- # hpmud parses mdns txt record badly
- # upstream tickets: https://bugs.launchpad.net/hplip/+bug/1797501
- # https://bugs.launchpad.net/hplip/+bug/1817214
- # https://bugs.launchpad.net/hplip/+bug/1821932
- # with no response from upstream
- # Patch taken from Debian https://lists.debian.org/debian-printing/2018/11/msg00049.html
- Patch42: hplip-hpmud-string-parse.patch
- # Part of https://bugzilla.redhat.com/show_bug.cgi?id=1694663
- # It was found out that specific device needs plugin for scanning
- # Reported upstream as https://bugs.launchpad.net/hplip/+bug/1822762
- Patch43: hplip-m278-m281-needs-plugin.patch
- # hpcups crashes when a printer needs a plugin and does not have one installed
- # it crashes in destructor, because pointer is not initialized
- # bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1695716
- # reported upstream
- Patch44: hplip-hpcups-crash.patch
- # Fixing the issues found by coverity scan
- # reported upstream https://bugs.launchpad.net/hplip/+bug/1808145
- Patch45: hplip-covscan.patch
- # Segfault during logging to syslog because argument are switched
- # bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1727162
- # upstream https://bugs.launchpad.net/hplip/+bug/1837846
- Patch46: hplip-logging-segfault.patch
- # Traceback in hp-systray when there are no resource
- # wanted to report upstream, but launchpad ends with timeout error
- # bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1738321
- Patch47: hplip-systray-blockerror.patch
- # several printers were removed in 3.19.1, but actually someone still uses them
- # reported upstream https://bugs.launchpad.net/hplip/+bug/1843592
- # bugzillas 1742949, 1740132, 1739855
- Patch48: hplip-missing-drivers.patch
- # laserjet 2200 and other devices have different device id than HP expects...
- # https://bugzilla.redhat.com/show_bug.cgi?id=1772698
- # reported upstream https://bugs.launchpad.net/hplip/+bug/1853002
- Patch49: hplip-model-mismatch.patch
- # sixext has problems with python3 strings (bz#1573430)
- # reported https://bugs.launchpad.net/bugs/1480152
- Patch50: hplip-unicodeerror.patch
- # error with new gcc, already reported in upstream as
- # https://bugs.launchpad.net/hplip/+bug/1836735
- Patch51: hplip-fix-Wreturn-type-warning.patch
- # upstream check for python clears OS build system
- # CFLAGS
- # https://bugs.launchpad.net/hplip/+bug/1879445
- Patch52: hplip-configure-python.patch
- # taken from hplip upstream report - toolbox uses deprecated method
- # setMargin(), which generates an exception, resulting in a infinite loop
- # of request on cupsd
- # https://bugs.launchpad.net/hplip/+bug/1880275
- Patch53: hplip-dialog-infinite-loop.patch
- # searching algorithm did not expect '-' in model name and thought it is a new PDL
- # it resulted in incorrect PPD match, so e.g. hpijs driver was used instead of hpcups
- # bug: https://bugzilla.redhat.com/show_bug.cgi?id=1590014
- # reported upstream: https://bugs.launchpad.net/hplip/+bug/1881587
- Patch54: hplip-find-driver.patch
- # hp-clean didn't work for Photosmart C1410 because it was comparing
- # string length with buffer size for string object, which is different,
- # causing cleaning to fail - the fix is to make the object bytes-like,
- # then buffer size is the same as the length.
- # Thanks to Stefan Assmann we were able to fix level 1 cleaning
- # for the device, but there can be similar issues with other devices
- # bug https://bugzilla.redhat.com/show_bug.cgi?id=1833308
- # reported upstream https://bugs.launchpad.net/hplip/+bug/1882193
- Patch55: hplip-clean-ldl.patch
- # 3.20.6 turned off requirement for most devices which needed it
- # - it will cause malfunction of printing and scanning for them
- # https://bugs.launchpad.net/hplip/+bug/1883898
- Patch56: hplip-revert-plugins.patch
- # python3.9 removes threading.Thread.isAlive() and it is substituted
- # by threading.Thread.is_alive()
- # https://bugzilla.redhat.com/show_bug.cgi?id=1861055
- # reported upstream https://bugs.launchpad.net/fedora/+bug/1889280
- Patch57: hplip-thread-isalive-removed.patch
- # Vine Patches
- Patch70: hplip-3.11.5-gksu.patch
- Patch80: hplip-3.16.5-hpijs.patch
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- Requires: cups
- Requires: dbus
- Requires: dbus-python3
- Requires: foomatic
- Requires: ghostscript
- Requires: openssl
- Requires: %{name}-libs = %{version}-%{release}
- BuildRequires: cups-devel
- BuildRequires: dbus-devel
- BuildRequires: desktop-file-utils
- BuildRequires: libusb1-devel
- BuildRequires: libjpeg-devel
- BuildRequires: net-snmp-devel
- BuildRequires: openssl-devel
- BuildRequires: python3-devel
- BuildRequires: python3-rpm-macros
- BuildRequires: python3-cups, cups
- BuildRequires: sane-devel
- BuildRequires: python3-qt5
- BuildRequires: libappstream-glib
- BuildRequires: gsettings-desktop-schemas
- # to force to use Qt5
- BuildConflicts: PyQt
- BuildConflicts: PyQt4
- Provides: hpijs = %{version}-%{release}
- Obsoletes: hpijs < %{version}-%{release}
- %description
- The Hewlett-Packard Linux Imaging and Printing Project provides
- drivers for HP printers and multi-function peripherals.
- It supports the DeskJet 350C, 600C, 600C Photo, 630C, Apollo 2000,
- Apollo 2100, Apollo 2560, DeskJet 800C, DeskJet 825, DeskJet 900,
- PhotoSmart, DeskJet 990C, and PhotoSmart 100 series.
- %description -l ja
- Hewlett-Packard Linux Imaging and Printing Project は HP 製プリンタ及びプリンタ複合機用のドライバを提供します。
- これには DeskJet 350C, 600C, 600C Photo, 630C, Apollo 2000, Apollo 2100, Apollo 2560, DeskJet 800C, DeskJet 825, DeskJet 900, PhotoSmart, DeskJet 990C, and PhotoSmart 100 シリーズ等が含まれます。
- #---------------------------------------------------------------------
- %package libs
- Summary: HPLIP libraries
- Summary(ja): HPLIP ライブラリ
- Group: System Environment/Libraries
- License: GPLv2+ and MIT
- Requires: python3
- %description libs
- Libraries needed by HPLIP.
- %description libs -l ja
- HPLIP 用のライブラリです。
- #---------------------------------------------------------------------
- %package gui
- Summary: HPLIP graphical tools
- Summary(ja): HPLIP 用 GUI ツール
- Group: Applications/System
- License: BSD
- Requires: %{name} = %{version}-%{release}
- Requires: python3-qt5
- #Requires: python3-reportlab
- Requires: python3-pygobject
- Requires: %{name}%{?_isa} = %{version}-%{release}
- Requires: libsane-hpaio%{?_isa} = %{version}-%{release}
- %description gui
- HP Device manager (toolbox) is a graphical utility including
- maintenance tools, supplies levels, and status information.
- %description gui -l ja
- HP デバイスマネージャ (toolbox) は、各種設定やインクや紙の残量確
- 認、ステータス情報の確認が行える HPLIP 用の GUI ユーティリティです。
- #---------------------------------------------------------------------
- %package -n libsane-hpaio
- Summary: SANE driver for scanners in HP's multi-function devices
- Summary(ja): HP 複合機のスキャナ用 SANE ドライバ
- Group: System Environment/Libraries
- License: GPLv2+
- Requires: %{name}-libs = %{version}-%{release}
- Requires: sane
- %description -n libsane-hpaio
- SANE driver for scanners in HP inkjet and laser based multi-function
- printers.
- %description -n libsane-hpaio -l ja
- HP インクジェット及びレーザープリンタ複合機のスキャナ機能を利用する
- 為の SANE ドライバです。
- #---------------------------------------------------------------------
- %debug_package
- #---------------------------------------------------------------------
- %prep
- %setup -q
- # The pstotiff filter is rubbish so replace it (launchpad #528394).
- %patch1 -p1 -b .pstotiff-is-rubbish
- # Fix compilation.
- %patch2 -p1 -b .strstr-const
- # Make utils.checkPyQtImport() look for the gui sub-package (bug #243273).
- %patch3 -p1 -b .ui-optional
- # Make sure to avoid handwritten asm.
- %patch4 -p1 -b .no-asm
- # Corrected several IEEE 1284 Device IDs using foomatic data.
- # Color LaserJet 2500 series (bug #659040)
- # LaserJet 4100 Series/2100 Series (bug #659039)
- %patch5 -p1 -b .deviceIDs-drv
- chmod +x %{SOURCE2}
- mv prnt/drv/hpijs.drv.in{,.deviceIDs-drv-hpijs}
- %{SOURCE2} prnt/drv/hpcups.drv.in \
- prnt/drv/hpijs.drv.in.deviceIDs-drv-hpijs \
- > prnt/drv/hpijs.drv.in
- # Move udev rules from /etc/ to /usr/lib/ (bug #748208).
- %patch6 -p1 -b .udev-rules
- # Retry when connecting to device fails (bug #532112).
- %patch7 -p1 -b .retry-open
- # Mark SNMP quirks in PPD for HP OfficeJet Pro 8500 (bug #581825).
- %patch8 -p1 -b .snmp-quirks
- # Fixed bogus low ink warnings from hpijs driver (bug #643643).
- %patch9 -p1 -b .hpijs-marker-supply
- # Clear old printer-state-reasons we used to manage (bug #510926).
- %patch10 -p1 -b .clear-old-state-reasons
- # Avoid busy loop in hpcups when backend has exited (bug #525944).
- %patch11 -p1 -b .hpcups-sigpipe
- # CUPS filters should use TMPDIR when available (bug #865603).
- %patch12 -p1 -b .logdir
- # Fixed Device ID parsing code in hpijs's dj9xxvip.c (bug #510926).
- %patch13 -p1 -b .bad-low-ink-warning
- # Add Device ID for
- # HP LaserJet Color M451dn (bug #1159380)
- for ppd_file in $(grep '^diff' %{PATCH14} | cut -d " " -f 4);
- do
- gunzip ${ppd_file#*/}.gz
- done
- %patch14 -p1 -b .deviceIDs-ppd
- for ppd_file in $(grep '^diff' %{PATCH14} | cut -d " " -f 4);
- do
- gzip -n ${ppd_file#*/}
- done
- # Fix ImageableArea for Laserjet 8150/9000 (bug #596298).
- for ppd_file in $(grep '^diff' %{PATCH15} | cut -d " " -f 4);
- do
- gunzip ${ppd_file#*/}.gz
- done
- %patch15 -p1 -b .ImageableArea
- for ppd_file in $(grep '^diff' %{PATCH15} | cut -d " " -f 4);
- do
- gzip -n ${ppd_file#*/}
- done
- # Scan to /var/tmp instead of /tmp (bug #1076954).
- %patch16 -p1 -b .scan-tmp
- # Treat logging before importing of logger module (bug #984699).
- %patch17 -p1 -b .log-stderr
- # Fix parsing of avahi-daemon output (bug #1096939).
- %patch18 -p1 -b .parsing
- # Fixed left/right margins for HP DeskJet 990C (LP #1405212).
- %patch20 -p1 -b .dj990c-margin
- # Fixed uses of strncpy throughout.
- %patch21 -p1 -b .strncpy
- # Don't try to write bytecode cache for hpfax backend (bug #1192761)
- # or hp-config_usb_printer (bug #1266903)
- # or hpps filter (bug #1241548).
- %patch22 -p1 -b .no-write-bytecode
- # Ignore IOError when logging output (bug #712537).
- %patch23 -p1 -b .silence-ioerror
- # [abrt] hplip: hp-scan:663:<module>:NameError: name 'source_option' is not defined (bug #1341304)
- %patch24 -p1 -b .sourceoption
- # hplip license problem (bug #1364711)
- %patch25 -p1 -b .no-ernie
- # hplip appdata
- %patch26 -p1 -b .appdata
- rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
- # hp-check shows 'CUPS incompatible or not running' even if CUPS is running (bug #1456467)
- %patch27 -p1 -b .check-cups
- # hp-firmware:NameError: name 'INTERACTIVE_MODE4' is not defined (bug #1533869)
- %patch30 -p1 -b .typo
- %patch31 -p1 -b .use-binary-str
- # TypeError: 'Error' object does not support indexing (bug #1564770)
- # upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1718129
- # in python2 it was possible to acces Exception message by index [0].
- # in python3 this is no longer possible and it causes TypeError.
- %patch32 -p1 -b .error-print-fix
- # TypeError: not all arguments converted during string formatting (bug #1566938)
- # upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/616450
- # bug caused by more arguments than argument specifiers in formatted string
- %patch33 -p1 -b .hpfax-import-error-print
- # 'WifiSetupDialog' object has no attribute 'wifiobj' (bug #1626877)
- # upstream bug: https://bugs.launchpad.net/hplip/+bug/1752060
- # bug caused by typo in wifisetupdialog wifiObj property call
- %patch34 -p1 -b .wifisetup-bad-call-fix
- # have pool of keyservers to choose
- %patch35 -p1 -b .keyserver
- # TypeError: argument 5 has unexpected type 'StandardButtons' (bug #1594602)
- # upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1745383
- # bug caused by typo in QMessageBox constructor call
- # this patch fixes more of those typos - some fixed by tkorbar, some taken from ubuntu fix
- %patch36 -p1 -b .qmsgbox-typos-fix
- # removal of non open source code, taken from ubuntu
- %patch37 -p1 -b .libimageprocessor-removal
- %__rm prnt/hpcups/libImageProcessor-x86*
- %patch38 -p1 -b .toolbox-crash
- # part of https://bugzilla.redhat.com/show_bug.cgi?id=1666076
- %patch39 -p1 -b .add-ppd-crash
- # 1671513 - after 'successful' plugin installation it is not installed
- %patch40 -p1 -b .missing-links
- # 1684434 - Scanning broken for HP LaserJet 3052
- %patch41 -p1 -b .hp-laserjet-3052-broken-scanning
- # 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 1)
- %patch42 -p1 -b .hpmud-string-parse
- # 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 2)
- %patch43 -p1 -b .m278-m281-needs-plugin
- # 1695716 - hpcups crashes in Compressor destructor
- %patch44 -p1 -b .hpcups-crash
- # fixing issues found by coverity scan
- %patch45 -p1 -b .covscan
- # segfault during logging (1727162)
- %patch46 -p1 -b .logging-segfault
- # 1738321 - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily unavailable
- %patch47 -p1 -b .systray-blockerror
- # 1742949, 1740132, 1739855 - missing drivers
- %patch48 -p1 -b .missing-drivers
- # 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat
- %patch49 -p1 -b .model-mismatch
- # 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes
- %patch50 -p1 -b .unicodeerror
- %patch51 -p1 -b .Wreturn-fix
- %patch52 -p1 -b .configure-python
- %patch53 -p1 -b .dialog-infinite-loop
- # 1590014 - hplip PPD search doesn't expect '-' in device name
- %patch54 -p1 -b .find-driver
- # 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error
- %patch55 -p1 -b .clean-ldl
- %patch56 -p1 -b .revert-plugins
- # 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive()
- %patch57 -p1 -b .thread-isalive-removed
- # vine
- #%patch70 -p1 -b .gksu
- %patch80 -p1 -b .hpijs
- sed -i.duplex-constraints \
- -e 's,\(UIConstraints.* \*Duplex\),//\1,' \
- prnt/drv/hpcups.drv.in
- # Change shebang /usr/bin/env python -> /usr/bin/python3 (bug #618351).
- find -name '*.py' -print0 | xargs -0 \
- sed -i.env-python -e 's,^#!/usr/bin/env python,#!%{__python3},'
- sed -i.env-python -e 's,^#!/usr/bin/env python,#!%{__python3},' \
- prnt/filters/hpps \
- fax/filters/pstotiff
- rm locatedriver
- cp -p %{SOURCE4} %{SOURCE5} ppd/hpcups
- %build
- # Work-around Makefile.am imperfections.
- sed -i 's|^AM_INIT_AUTOMAKE|AM_INIT_AUTOMAKE([foreign])|g' configure.in
- touch NEWS README AUTHORS ChangeLog
- autoreconf -fiv
- %configure \
- --enable-scan-build --enable-gui-build --enable-fax-build \
- --disable-foomatic-rip-hplip-install --enable-pp-build \
- --disable-qt4 --enable-qt5 \
- --enable-hpcups-install --enable-cups-drv-install \
- --enable-foomatic-drv-install --enable-dbus-build \
- --enable-hpijs-install \
- --enable-policykit \
- --with-mimedir=%{_datadir}/cups/mime \
- --with-cupsbackenddir=%{_libdir}/cups/backend \
- --with-cupsfilterdir=%{_libdir}/cups/filter \
- --with-hpppddir=%{_datadir}/foomatic/db/source/PPD/HP \
- PYTHON=%{__python3}
- make %{?_smp_mflags}
- %install
- rm -rf $RPM_BUILD_ROOT
- make install DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} rulesdir=/lib/udev/rules.d
- # Create /run/hplip & /var/lib/hp
- mkdir -p $RPM_BUILD_ROOT/run/hplip
- mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/hp
- # install modified .desktop
- #{__install} -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_datadir}/applications/hplip.desktop
- # install /usr/lib/tmpfiles.d/hplip.conf (bug #1015831)
- mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
- cat > $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/hplip.conf <<EOF
- # See tmpfiles.d(5) for details
- d /run/hplip 0775 root lp -
- EOF
- # remove unpacked files.
- rm -rf %{buildroot}%{_sysconfdir}/sane.d \
- %{buildroot}%{_docdir} \
- %{buildroot}%{_datadir}/hal/fdi \
- %{buildroot}%{_datadir}/hplip/pkservice.py \
- %{buildroot}%{_bindir}/hp-pkservice \
- %{buildroot}%{_datadir}/hplip/locatedriver* \
- %{buildroot}%{_datadir}/hplip/dat2drv*
- rm -f %{buildroot}%{_bindir}/hp-logcapture \
- %{buildroot}%{_bindir}/hp-doctor \
- %{buildroot}%{_bindir}/hp-pqdiag \
- %{buildroot}%{_datadir}/hplip/logcapture.py \
- %{buildroot}%{_datadir}/hplip/doctor.py \
- %{buildroot}%{_datadir}/hplip/pqdiag.py
- rm -f %{buildroot}%{_bindir}/foomatic-rip \
- %{buildroot}%{_libdir}/cups/filter/foomatic-rip \
- %{buildroot}%{_libdir}/*.la \
- %{buildroot}%{python3_sitearch}/*.la \
- %{buildroot}%{_libdir}/libhpip.so \
- %{buildroot}%{_libdir}/libhpipp.so \
- %{buildroot}%{_libdir}/libhpdiscovery.so \
- %{buildroot}%{_libdir}/sane/*.la \
- %{buildroot}%{_datadir}/cups/model/foomatic-ppds \
- %{buildroot}%{_datadir}/applications/hplip.desktop \
- %{buildroot}%{_datadir}/ppd/HP/*.ppd
- mkdir -p %{buildroot}%{_datadir}/metainfo
- cp %{SOURCE3} %{buildroot}%{_datadir}/metainfo/
- mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,64x64}/apps
- install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/16x16/hp_logo.png \
- %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/hp_logo.png
- install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/32x32/hp_logo.png \
- %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/hp_logo.png
- install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/64x64/hp_logo.png \
- %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/hp_logo.png
- mkdir -p %{buildroot}%{_datadir}/applications
- sed -i -e '/^Categories=/d' hplip.desktop
- # Encoding key is deprecated
- sed -i -e '/^Encoding=/d' hplip.desktop
- desktop-file-validate hplip.desktop
- desktop-file-install \
- --dir %{buildroot}/%{_datadir}/applications \
- --add-category System \
- --add-category Settings \
- --add-category HardwareSettings \
- hplip.desktop
- appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
- # install hp-uiscan desktop file
- sed -i 's/\/usr\/share\/icons\/Humanity\/devices\/48\/printer\.svg/hp_logo/' hp-uiscan.desktop
- # Regenerate hpcups PPDs on upgrade if necessary (bug #579355).
- #install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/hpcups-update-ppds
- %{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/sane.d/dll.d
- echo hpaio > $RPM_BUILD_ROOT%{_sysconfdir}/sane.d/dll.d/hpaio
- # Images in docdir should not be executable (bug #440552).
- find doc/images -type f -exec chmod 644 {} \;
- # Create an empty plugins directory to make sure it gets the right
- # SELinux file context (bug #564551).
- %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/hplip/prnt/plugins
- # Remove files we don't want to package.
- rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/hpaio.desc
- rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/hplip-install
- rm -rf $RPM_BUILD_ROOT%{_datadir}/hplip/install.*
- rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/uninstall.*
- rm -f $RPM_BUILD_ROOT%{_bindir}/hp-uninstall
- rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/upgrade.*
- rm -f $RPM_BUILD_ROOT%{_bindir}/hp-upgrade
- rm -f $RPM_BUILD_ROOT%{_bindir}/hp-config_usb_printer
- rm -f $RPM_BUILD_ROOT%{_unitdir}/hplip-printer@.service
- rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/config_usb_printer.*
- rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/hpijs.drv.in.template
- rm -f $RPM_BUILD_ROOT%{_datadir}/cups/mime/pstotiff.types
- rm -f $RPM_BUILD_ROOT%{_datadir}/hplip/fax/pstotiff*
- rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/systemd
- # The systray applet doesn't work properly (displays icon as a
- # window), so don't ship the launcher yet.
- rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post libs -p /sbin/ldconfig
- %postun libs -p /sbin/ldconfig
- %files
- %defattr(-,root,root)
- %doc COPYING doc/*
- #%doc %{_datadir}/doc/%{name}-%{version}
- %{_bindir}/hp-align
- %{_bindir}/hp-clean
- %{_bindir}/hp-colorcal
- %{_bindir}/hp-devicesettings
- %{_bindir}/hp-diagnose_plugin
- %{_bindir}/hp-diagnose_queues
- %{_bindir}/hp-fab
- %{_bindir}/hp-faxsetup
- %{_bindir}/hp-firmware
- %{_bindir}/hp-info
- %{_bindir}/hp-levels
- %{_bindir}/hp-linefeedcal
- %{_bindir}/hp-makecopies
- %{_bindir}/hp-makeuri
- %{_bindir}/hp-plugin
- %{_bindir}/hp-printsettings
- %{_bindir}/hp-probe
- %{_bindir}/hp-query
- %{_bindir}/hp-scan
- %{_bindir}/hp-sendfax
- %{_bindir}/hp-setup
- %{_bindir}/hp-testpage
- %{_bindir}/hp-timedate
- %{_bindir}/hp-unload
- %{_bindir}/hp-wificonfig
- %{_libdir}/cups/backend/hp
- %{_libdir}/cups/backend/hpfax
- %{_libdir}/cups/filter/hpcups
- %{_libdir}/cups/filter/hpcupsfax
- %{_libdir}/cups/filter/hpps
- %{_libdir}/cups/filter/pstotiff
- %{_datadir}/cups/mime/pstotiff.convs
- # Files
- %{_datadir}/hplip/align.py*
- %{_datadir}/hplip/check-plugin.py*
- %{_datadir}/hplip/clean.py*
- %{_datadir}/hplip/colorcal.py*
- %{_datadir}/hplip/devicesettings.py*
- %{_datadir}/hplip/diagnose_plugin.py*
- %{_datadir}/hplip/diagnose_queues.py*
- %{_datadir}/hplip/fab.py*
- %{_datadir}/hplip/fax
- %{_datadir}/hplip/faxsetup.py*
- %{_datadir}/hplip/firmware.py*
- %{_datadir}/hplip/hpdio.py*
- %{_datadir}/hplip/hplip_clean.sh
- %{_datadir}/hplip/hpssd*
- %{_datadir}/hplip/info.py*
- %{_datadir}/hplip/__init__.py*
- %{_datadir}/hplip/levels.py*
- %{_datadir}/hplip/linefeedcal.py*
- %{_datadir}/hplip/makecopies.py*
- %{_datadir}/hplip/makeuri.py*
- %{_datadir}/hplip/plugin.py*
- %{_datadir}/hplip/printsettings.py*
- %{_datadir}/hplip/probe.py*
- %{_datadir}/hplip/query.py*
- %{_datadir}/hplip/scan.py*
- %{_datadir}/hplip/sendfax.py*
- %{_datadir}/hplip/setup.py*
- %{_datadir}/hplip/testpage.py*
- %{_datadir}/hplip/timedate.py*
- %{_datadir}/hplip/unload.py*
- %{_datadir}/hplip/wificonfig.py*
- # Directories
- %{_datadir}/hplip/base
- %{_datadir}/hplip/copier
- %{_datadir}/hplip/data/ldl
- %{_datadir}/hplip/data/localization
- %{_datadir}/hplip/data/pcl
- %{_datadir}/hplip/data/ps
- %{_datadir}/hplip/installer
- %{_datadir}/hplip/pcard
- %{_datadir}/hplip/prnt
- %{_datadir}/hplip/scan
- %{_localstatedir}/lib/hp
- %dir %attr(0775,root,lp) /run/hplip
- %{_prefix}/lib/tmpfiles.d/hplip.conf
- %dir %{_sysconfdir}/hp
- %config(noreplace) %{_sysconfdir}/hp/hplip.conf
- /lib/udev/rules.d/56-hpmud.rules
- %dir %{_datadir}/hplip
- %dir %{_datadir}/hplip/data
- %{_datadir}/hplip/data/models
- %{_bindir}/hpijs
- #{_bindir}/hpcups-update-ppds
- %{_datadir}/cups/drv/*
- %dir %{_datadir}/foomatic/db/source/PPD/HP
- %{_datadir}/foomatic/db/source/PPD/HP/*
- %{_sysconfdir}/dbus-1/system.d/com.hp.hplip.conf
- %{_datadir}/dbus-1/system-services/com.hp.hplip.service
- %{_datadir}/polkit-1/actions/com.hp.hplip.policy
- %files libs
- %defattr(-,root,root)
- %{_libdir}/libhpip.so.*
- # The so symlink is required here (see bug #489059).
- %{_libdir}/libhpmud.so*
- %{_libdir}/libhpdiscovery.so*
- %{_libdir}/libhpipp.so*
- # Python extension
- %{python3_sitearch}/*
- %files gui
- %defattr(-,root,root)
- %{_bindir}/hp-check
- %{_bindir}/hp-print
- %{_bindir}/hp-systray
- %{_bindir}/hp-toolbox
- %{_bindir}/hp-uiscan
- %{_datadir}/applications/*.desktop
- %{_datadir}/metainfo/hplip.metainfo.xml
- # Files
- %{_datadir}/icons/hicolor/*/apps/*
- %{_datadir}/hplip/check.py*
- %{_datadir}/hplip/print.py*
- %{_datadir}/hplip/systray.py*
- %{_datadir}/hplip/toolbox.py*
- %{_datadir}/hplip/uiscan.py*
- # Directories
- %{_datadir}/hplip/data/images
- %{_datadir}/hplip/ui5
- %{_datadir}/hplip/uiscan.py*
- %files -n libsane-hpaio
- %defattr(-,root,root)
- %{_libdir}/sane/libsane-hpaio*
- %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
- %changelog
- * Tue Sep 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.20.6-2
- - rebuilt with net-snmp-5.9.
- * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.20.6-1
- - new upstream release.
- * Thu May 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.18.12-1
- - dropped R:gksu.
- - imported Patche36-47 from rawhide.
- - switched to python3.
- - switched gui to Qt5.
- * Wed Nov 07 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.18.10-1
- - new upstream release.
- - updated Patch12.
- - imported Patche24-35 from rawhide.
- * Sat Jul 2 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.16.5-1
- - new upstream release.
- - dropped all patches.
- - imported all patches from rawhide.
- - added Patch80 to fix error in building hpijs.
- * Sun May 15 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.15.2-2
- - rebuild with openssl-1.0.2
- * Thu Mar 19 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.15.2-1
- - updated to 3.15.2
- - updated Source1
- - renumbered former Patch 0 and 1 to Patch 70 and 6
- - built with libusb1
- - added BR: desktop-file-utils
- * Wed Mar 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-5
- - rebuild with net-snmp-5.7.1
- * Wed Mar 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-5
- - rebuild with net-snmp-5.7.1
- * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.11.5-4
- - rebuild with python-2.7.2
- * Mon Jun 13 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-3
- - add Obsoletes: hpijs < 3.10
- * Sun Jun 12 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-2
- - change configure option to --enable-hpijs-install
- - add Provides: hpijs
- - change ppd installation path to %{_datadir}/foomatic/db/source/PPD/HP
- - update Source1 (hplip.desktop.vine)
- - update Patch0 (hplip-3.11.5-gksu.patch)
- - add Patch1 to fix udev old syntax (hplip-udev-rules.patch)
- * Tue Mar 15 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-1
- - new upstream release
- - change configure option: disable qt3 and enable qt4
- - add configure option: --enable-foomatic-drv-install
- - add BuildRequires: openssl-devel
- - add Requires: dbus-python
- - add Requires: notify-python (gui)
- - change Requires: PyQt to PyQt4 (gui)
- - add BuildConflicts: PyQt
- - add ppds below %{_datadir}/cups/model/foomatic/hp-*
- because foomatic (>= 4.0.3) drop PPDs for HP printers.
- * Fri Jul 24 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.9.4b-3
- - add Patch0 to require root privilege (via gksu) when adding printer
- - add Requires: gksu
- * Mon Jun 08 2009 Shu KONNO <owa@bg.wakwak.com> 3.9.4b-2
- - added --with-cupsfilterdir to configure option
- - use python_sitearch macro instead of python_platlib
- * Sun Jun 07 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.9.4b-1
- - new upstream release
- - split libraries to -libs sub package
- - update configure option
- add --enable-dbus-build, --enable-qt3, --disable-qt4
- * Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> 2.7.12-1vl5
- - rebuilt with python-2.5.2
- - added python_platlib macro
- - applied new versioning policy and spec in utf-8
- * Sun Jan 6 2008 Shu KONNO <owa@bg.wakwak.com> 2.7.12-0vl2
- - added --with-cupsbackenddir=%%{_libdir}/cups/backend to configure
- * Thu Jan 3 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.7.12-0vl1
- - new upstream release
- - build with net-snmp-5.4.1
- * Thu Jun 28 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.7.6-0vl1
- - initial build for Vine Linux
|