hplip-vl.spec 26 KB

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