You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2006-2011 OpenWrt.org
  3. # Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=hplip
  10. PKG_VERSION:=3.18.6
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/hplip
  14. PKG_HASH:=0ecf3e68b09480f602de81798ac00774cf8ffe754692e784bbbe0f9b2e337b7d
  15. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  16. PKG_LICENSE:=GPL-2.0 GPL-2.0+
  17. PKG_LICENSE_FILES:=COPYING LICENSE
  18. PKG_BUILD_DEPENDS := python libcups
  19. PKG_FIXUP:=autoreconf
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/hplip/Default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=HP Linux Imaging and Printing
  25. URL:=http://sourceforge.net/projects/hplip/
  26. endef
  27. define Package/hplip/Default/description
  28. HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.
  29. endef
  30. define Package/hplip-common
  31. $(call Package/hplip/Default)
  32. TITLE+= (common files)
  33. DEPENDS+=+libusb-1.0
  34. endef
  35. define Package/hplip-common/description
  36. $(call Package/hplip/Default/description)
  37. These are common files shared between subpackages
  38. endef
  39. define Package/hplip-sane
  40. $(call Package/hplip/Default)
  41. TITLE+= (scanner drivers)
  42. DEPENDS+=+libsane +hplip-common
  43. endef
  44. define Package/hplip-sane/description
  45. $(call Package/hplip/Default/description)
  46. S.A.N.E backend for HP Scanners
  47. endef
  48. CONFIGURE_ARGS += \
  49. --disable-gui-build \
  50. --disable-network-build \
  51. --disable-fax-build \
  52. --disable-pp-build \
  53. --disable-doc-build \
  54. --disable-dbus-build \
  55. --enable-lite-build
  56. define Package/hplip-common/install
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_BUILD_DIR)/.libs/libhpip.so* $(1)/usr/lib/
  59. $(CP) $(PKG_BUILD_DIR)/.libs/libhpmud.so* $(1)/usr/lib/
  60. $(INSTALL_DIR) $(1)/etc/hp
  61. $(CP) $(PKG_BUILD_DIR)/hplip.conf $(1)/etc/hp/hplip.conf
  62. $(INSTALL_DIR) $(1)/usr/share/hplip/data/models/
  63. $(CP) $(PKG_BUILD_DIR)/data/models/models.dat $(1)/usr/share/hplip/data/models/
  64. $(INSTALL_DIR) $(1)/etc/hotplug.d/usb/
  65. $(INSTALL_BIN) ./files/20-hplip $(1)/etc/hotplug.d/usb/
  66. endef
  67. define Package/hplip-sane/install
  68. $(INSTALL_DIR) $(1)/usr/lib/sane
  69. $(CP) $(PKG_BUILD_DIR)/.libs/libsane-hpaio.so* $(1)/usr/lib/sane
  70. $(INSTALL_DIR) $(1)/etc/sane.d/dll.d/
  71. $(INSTALL_DATA) ./files/hplib.conf $(1)/etc/sane.d/dll.d/hplib
  72. endef
  73. define Package/hplip-common/conffiles
  74. /etc/hp/hplip.conf
  75. endef
  76. define Package/hplip-sane/conffiles
  77. /etc/sane.d/dll.d/hplib
  78. endef
  79. $(eval $(call BuildPackage,hplip-common))
  80. $(eval $(call BuildPackage,hplip-sane))