hplip-vl.spec 11 KB

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