hplip-vl.spec 9.2 KB

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