hplip-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  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.11.5
  6. Release: 2%{?_dist_release}
  7. Source0: %{name}-%{version}.tar.gz
  8. Source1: hplip.desktop.vine
  9. Patch0: hplip-3.11.5-gksu.patch
  10. Patch1: hplip-udev-rules.patch
  11. License: GPL/MIT
  12. Group: Applications/Publishing
  13. URL: http://hplipopensource.com/hplip-web/index.html
  14. Provides: hpijs
  15. Requires: cups
  16. Requires: dbus
  17. Requires: foomatic
  18. Requires: ghostscript
  19. Requires: libjpeg
  20. Requires: openssl
  21. Requires: python-imaging
  22. Requires: dbus-python
  23. Requires: %{name}-libs = %{version}-%{release}
  24. Requires: gksu
  25. BuildRequires: cups-devel
  26. BuildRequires: dbus-devel
  27. BuildRequires: libusb-devel
  28. BuildRequires: libjpeg-devel
  29. BuildRequires: net-snmp-devel
  30. BuildRequires: openssl-devel
  31. BuildRequires: python-devel >= 2.3
  32. BuildRequires: sane-devel
  33. BuildRequires: PyQt4
  34. # to force to use PyQt4
  35. BuildConflicts: PyQt
  36. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  37. Packager: kazutaka
  38. # When below files are included in %files section,
  39. # find-requires shows strange error.
  40. # %{_datadir}/hplip/base/kirbybase.py and pexpect.py
  41. # So, below option is added to aboid this.
  42. #AutoReq: False
  43. %description
  44. HPLIP is an HP developed solution for printing, scanning, and
  45. faxing with HP inkjet and laser based printers in Linux.
  46. The HPLIP project provides printing support for 1,151 printer
  47. models, including Deskjet, Officejet, Photosmart, PSC (Print Scan
  48. Copy), Business Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP.
  49. %description -l ja
  50. HPLIP は HP が開発した HP インクジェット及びレーザープリンタ向けの、
  51. プリンタ/スキャナ/FAX 機能を Linux 上で利用する為のソリューション
  52. です。
  53. HPLIP プロジェクトでは1,151種類のプリンタをサポートしています。
  54. これには Deskjet、 Officejet、 Photosmart、 PSC (Print Scan Copy)、
  55. Business Inkjet、 LaserJet、 Edgeline MFP 及び LaserJet MFP が
  56. 含まれます。
  57. #---------------------------------------------------------------------
  58. %package libs
  59. Summary: HPLIP libraries
  60. Summary(ja): HPLIP ライブラリ
  61. Group: System Environment/Libraries
  62. License: GPL/MIT
  63. %description libs
  64. Libraries needed by HPLIP.
  65. %description libs -l ja
  66. HPLIP 用のライブラリです。
  67. #---------------------------------------------------------------------
  68. %package gui
  69. Summary: HPLIP graphical tools
  70. Summary(ja): HPLIP 用 GUI ツール
  71. Group: Applications/System
  72. License: GPL/MIT
  73. Requires: %{name} = %{version}-%{release}
  74. Requires: PyQt4
  75. Requires: notify-python
  76. %description gui
  77. HP Device manager (toolbox) is a graphical utility including
  78. maintenance tools, supplies levels, and status information.
  79. %description gui -l ja
  80. HP デバイスマネージャ (toolbox) は、各種設定やインクや紙の残量確
  81. 認、ステータス情報の確認が行える HPLIP 用の GUI ユーティリティです。
  82. #---------------------------------------------------------------------
  83. %package -n libsane-hpaio
  84. Summary: SANE driver for scanners in HP's multi-function devices
  85. Summary(ja): HP 複合機のスキャナ用 SANE ドライバ
  86. Group: System Environment/Libraries
  87. License: GPL/MIT
  88. Requires: %{name}-libs = %{version}-%{release}
  89. Requires: sane
  90. %description -n libsane-hpaio
  91. SANE driver for scanners in HP inkjet and laser based multi-function
  92. printers.
  93. %description -n libsane-hpaio -l ja
  94. HP インクジェット及びレーザープリンタ複合機のスキャナ機能を利用する
  95. 為の SANE ドライバです。
  96. #---------------------------------------------------------------------
  97. %prep
  98. %setup -q
  99. %patch0 -p1 -b .gksu
  100. %patch1 -p1 -b .udev-rules
  101. %build
  102. %configure --enable-doc-build \
  103. --enable-network-build \
  104. --disable-pp-build \
  105. --enable-scan-build \
  106. --enable-gui-build \
  107. --enable-fax-build \
  108. --enable-dbus-build \
  109. --enable-qt4 \
  110. --disable-qt3 \
  111. --enable-hpijs-install \
  112. --enable-hpcups-install \
  113. --enable-cups-drv-install \
  114. --enable-foomatic-drv-install \
  115. --disable-cups-ppd-install \
  116. --disable-foomatic-ppd-install \
  117. --with-cupsbackenddir=%{_libdir}/cups/backend \
  118. --with-cupsfilterdir=%{_libdir}/cups/filter \
  119. --with-hpppddir=%{_datadir}/foomatic/db/source/PPD/HP
  120. %{__make}
  121. %install
  122. %{__rm} -rf ${RPM_BUILD_ROOT}
  123. %{__make} install DESTDIR=${RPM_BUILD_ROOT}
  124. # install modified .desktop
  125. %{__install} -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_datadir}/applications/hplip.desktop
  126. # remove unpacked files.
  127. %{__rm} -rf ${RPM_BUILD_ROOT}/%{_sysconfdir}/sane.d
  128. # remove unnecessary files.
  129. %{__rm} -rf ${RPM_BUILD_ROOT}/%{_libdir}/libhpip.la
  130. %{__rm} -rf ${RPM_BUILD_ROOT}/%{_libdir}/libhpmud.la
  131. %{__rm} -rf ${RPM_BUILD_ROOT}/%{python_sitearch}/cupsext.la
  132. %{__rm} -rf ${RPM_BUILD_ROOT}/%{python_sitearch}/hpmudext.la
  133. %{__rm} -rf ${RPM_BUILD_ROOT}/%{python_sitearch}/pcardext.la
  134. %{__rm} -rf ${RPM_BUILD_ROOT}/%{python_sitearch}/scanext.la
  135. %{__rm} -rf ${RPM_BUILD_ROOT}/%{_libdir}/sane/libsane-hpaio.la
  136. %clean
  137. %__rm -rf ${RPM_BUILD_ROOT}
  138. %post libs
  139. /sbin/ldconfig
  140. %postun libs
  141. /sbin/ldconfig
  142. %post gui
  143. /usr/bin/update-desktop-database &>/dev/null ||:
  144. %postun gui
  145. /usr/bin/update-desktop-database &>/dev/null ||:
  146. %post -n libsane-hpaio
  147. /sbin/ldconfig
  148. if [ -f /etc/sane.d/dll.conf ] && \
  149. ! grep ^hpaio /etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
  150. echo hpaio >> /etc/sane.d/dll.conf; \
  151. fi
  152. %files
  153. %defattr(-,root,root)
  154. %doc %{_datadir}/doc/%{name}-%{version}
  155. %{_bindir}/hp-align
  156. %{_bindir}/hp-check
  157. %{_bindir}/hp-clean
  158. %{_bindir}/hp-colorcal
  159. %{_bindir}/hp-devicesettings
  160. %{_bindir}/hp-fab
  161. %{_bindir}/hp-faxsetup
  162. %{_bindir}/hp-firmware
  163. %{_bindir}/hp-info
  164. %{_bindir}/hp-levels
  165. %{_bindir}/hp-linefeedcal
  166. %{_bindir}/hp-makecopies
  167. %{_bindir}/hp-makeuri
  168. %{_bindir}/hp-mkuri
  169. %{_bindir}/hp-plugin
  170. %{_bindir}/hp-pqdiag
  171. %{_bindir}/hp-pkservice
  172. %{_bindir}/hp-printsettings
  173. %{_bindir}/hp-probe
  174. %{_bindir}/hp-query
  175. %{_bindir}/hp-scan
  176. %{_bindir}/hp-sendfax
  177. %{_bindir}/hp-setup
  178. %{_bindir}/hp-systray
  179. %{_bindir}/hp-testpage
  180. %{_bindir}/hp-timedate
  181. %{_bindir}/hp-unload
  182. %{_bindir}/hp-wificonfig
  183. %{_bindir}/hpijs
  184. %{_datadir}/hal/fdi/preprobe/10osvendor/20-hplip-devices.fdi
  185. %{_datadir}/hplip/__init__.py
  186. %{_datadir}/hplip/align.py
  187. %{_datadir}/hplip/base
  188. %{_datadir}/hplip/check.py
  189. %{_datadir}/hplip/clean.py
  190. %{_datadir}/hplip/colorcal.py
  191. %{_datadir}/hplip/copier
  192. %{_datadir}/hplip/data/ldl
  193. %{_datadir}/hplip/data/models
  194. %{_datadir}/hplip/data/pcl
  195. %{_datadir}/hplip/data/ps
  196. %{_datadir}/hplip/devicesettings.py
  197. %{_datadir}/hplip/fax
  198. %{_datadir}/hplip/faxsetup.py
  199. %{_datadir}/hplip/firmware.py
  200. %{_datadir}/hplip/hpdio.py
  201. %{_datadir}/hplip/hpssd.py
  202. %{_datadir}/hplip/info.py
  203. %{_datadir}/hplip/installer
  204. %{_datadir}/hplip/levels.py
  205. %{_datadir}/hplip/linefeedcal.py
  206. %{_datadir}/hplip/makecopies.py
  207. %{_datadir}/hplip/makeuri.py
  208. %{_datadir}/hplip/pcard
  209. %{_datadir}/hplip/pkservice.py
  210. %{_datadir}/hplip/plugin.py
  211. %{_datadir}/hplip/pqdiag.py
  212. %{_datadir}/hplip/printsettings.py
  213. %{_datadir}/hplip/prnt
  214. %{_datadir}/hplip/probe.py
  215. %{_datadir}/hplip/query.py
  216. %{_datadir}/hplip/scan
  217. %{_datadir}/hplip/testpage.py
  218. %{_datadir}/hplip/timedate.py
  219. %{_datadir}/hplip/unload.py
  220. %{_datadir}/hplip/wificonfig.py
  221. %{_datadir}/cups/drv/hp/hpcups.drv
  222. %{_datadir}/cups/drv/hp/hpijs.drv
  223. %{_datadir}/foomatic/db/source/PPD/HP
  224. %{_libdir}/cups/backend/hp
  225. %{_libdir}/cups/backend/hpfax
  226. %{_libdir}/cups/filter/hpcups
  227. %{_libdir}/cups/filter/hpcac
  228. %{_libdir}/cups/filter/hpcupsfax
  229. %{_libdir}/cups/filter/hplipjs
  230. %{_libdir}/cups/filter/hpps
  231. %{_libdir}/cups/filter/pstotiff
  232. %config(noreplace) %{_sysconfdir}/hp/hplip.conf
  233. %{_sysconfdir}/cups/pstotiff.convs
  234. %{_sysconfdir}/cups/pstotiff.types
  235. %{_sysconfdir}/udev/rules.d/55-hpmud.rules
  236. %{_sysconfdir}/udev/rules.d/56-hpmud_support.rules
  237. %{_localstatedir}/lib/hp
  238. %files libs
  239. %defattr(-,root,root)
  240. %{_libdir}/libhpip.so*
  241. %{_libdir}/libhpmud.so*
  242. %{python_sitearch}/cupsext.so
  243. %{python_sitearch}/hpmudext.so
  244. %{python_sitearch}/pcardext.so
  245. %{python_sitearch}/scanext.so
  246. %files gui
  247. %defattr(-,root,root)
  248. %{_bindir}/hp-fab
  249. %{_bindir}/hp-print
  250. %{_bindir}/hp-scan
  251. %{_bindir}/hp-sendfax
  252. %{_bindir}/hp-setup
  253. %{_bindir}/hp-toolbox
  254. %{_datadir}/hplip/data/images
  255. %{_datadir}/hplip/data/localization
  256. %{_datadir}/hplip/fab.py
  257. %{_datadir}/hplip/print.py
  258. %{_datadir}/hplip/scan.py
  259. %{_datadir}/hplip/sendfax.py
  260. %{_datadir}/hplip/setup.py
  261. %{_datadir}/hplip/systray.py
  262. %{_datadir}/hplip/toolbox.py
  263. %{_datadir}/hplip/ui4
  264. %{_datadir}/applications/hplip.desktop
  265. %{_sysconfdir}/xdg/autostart/hplip-systray.desktop
  266. %files -n libsane-hpaio
  267. %defattr(-,root,root)
  268. %{_libdir}/sane/libsane-hpaio*
  269. %changelog
  270. * Sun Jun 12 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-2
  271. - change configure option to --enable-hpijs-install
  272. - add Provides: hpijs
  273. - change ppd installation path to %{_datadir}/foomatic/db/source/PPD/HP
  274. - update Source1 (hplip.desktop.vine)
  275. - update Patch0 (hplip-3.11.5-gksu.patch)
  276. - add Patch1 to fix udev old syntax (hplip-udev-rules.patch)
  277. * Tue Mar 15 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 3.11.5-1
  278. - new upstream release
  279. - change configure option: disable qt3 and enable qt4
  280. - add configure option: --enable-foomatic-drv-install
  281. - add BuildRequires: openssl-devel
  282. - add Requires: dbus-python
  283. - add Requires: notify-python (gui)
  284. - change Requires: PyQt to PyQt4 (gui)
  285. - add BuildConflicts: PyQt
  286. - add ppds below %{_datadir}/cups/model/foomatic/hp-*
  287. because foomatic (>= 4.0.3) drop PPDs for HP printers.
  288. * Fri Jul 24 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.9.4b-3
  289. - add Patch0 to require root privilege (via gksu) when adding printer
  290. - add Requires: gksu
  291. * Mon Jun 08 2009 Shu KONNO <owa@bg.wakwak.com> 3.9.4b-2
  292. - added --with-cupsfilterdir to configure option
  293. - use python_sitearch macro instead of python_platlib
  294. * Sun Jun 07 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 3.9.4b-1
  295. - new upstream release
  296. - split libraries to -libs sub package
  297. - update configure option
  298. add --enable-dbus-build, --enable-qt3, --disable-qt4
  299. * Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> 2.7.12-1vl5
  300. - rebuilt with python-2.5.2
  301. - added python_platlib macro
  302. - applied new versioning policy and spec in utf-8
  303. * Sun Jan 6 2008 Shu KONNO <owa@bg.wakwak.com> 2.7.12-0vl2
  304. - added --with-cupsbackenddir=%%{_libdir}/cups/backend to configure
  305. * Thu Jan 3 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.7.12-0vl1
  306. - new upstream release
  307. - build with net-snmp-5.4.1
  308. * Thu Jun 28 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.7.6-0vl1
  309. - initial build for Vine Linux