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.

117 lines
3.0 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.19.12
  11. PKG_RELEASE:=2
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/hplip
  14. PKG_HASH:=b7f398502fb659e0de8e54976237e3c6a64fec0b3c36054a515876f7b006b255
  15. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  16. PKG_LICENSE:=GPL-2.0 GPL-2.0-or-later
  17. PKG_LICENSE_FILES:=COPYING LICENSE
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_BUILD_DEPENDS:=libcups
  20. PKG_FIXUP:=autoreconf
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/hplip/Default
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=HP Linux Imaging and Printing
  26. URL:=https://sourceforge.net/projects/hplip/
  27. endef
  28. define Package/hplip/Default/description
  29. HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.
  30. endef
  31. define Package/hplip-common
  32. $(call Package/hplip/Default)
  33. TITLE+= (common files)
  34. DEPENDS+=+libusb-1.0
  35. endef
  36. define Package/hplip-common/description
  37. $(call Package/hplip/Default/description)
  38. These are common files shared between subpackages
  39. endef
  40. define Package/hplip-sane
  41. $(call Package/hplip/Default)
  42. TITLE+= (scanner drivers)
  43. DEPENDS+=+libsane +hplip-common
  44. endef
  45. define Package/hplip-sane/description
  46. $(call Package/hplip/Default/description)
  47. S.A.N.E backend for HP Scanners
  48. endef
  49. CONFIGURE_ARGS += \
  50. --disable-gui-build \
  51. --disable-network-build \
  52. --disable-fax-build \
  53. --disable-pp-build \
  54. --disable-doc-build \
  55. --disable-dbus-build \
  56. --disable-hpijs-only-build \
  57. --disable-hpcups-install \
  58. --disable-hpps-install \
  59. --disable-cups-drv-install \
  60. --enable-lite-build
  61. define Build/Install
  62. mkdir -p $(PKG_INSTALL_DIR)/usr/share/sane
  63. sed -n -e '/key="usb.product_id"/{s/.*int_outof="0x//;s/;0x/\n/g;s/".*//;p}' \
  64. $(PKG_BUILD_DIR)/data/rules/20-hplip-devices.fdi | sort -u > \
  65. $(PKG_INSTALL_DIR)/usr/share/sane/03f0-hplip.usbid
  66. endef
  67. define Package/hplip-common/install
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_BUILD_DIR)/.libs/libhpip.so* $(1)/usr/lib/
  70. $(CP) $(PKG_BUILD_DIR)/.libs/libhpmud.so* $(1)/usr/lib/
  71. $(INSTALL_DIR) $(1)/etc/hp
  72. $(CP) $(PKG_BUILD_DIR)/hplip.conf $(1)/etc/hp/hplip.conf
  73. $(INSTALL_DIR) $(1)/usr/share/hplip/data/models/
  74. $(CP) $(PKG_BUILD_DIR)/data/models/models.dat $(1)/usr/share/hplip/data/models/
  75. endef
  76. define Package/hplip-sane/install
  77. $(INSTALL_DIR) $(1)/usr/lib/sane
  78. $(CP) $(PKG_BUILD_DIR)/.libs/libsane-hpaio.so* $(1)/usr/lib/sane
  79. $(INSTALL_DIR) $(1)/etc/sane.d/dll.d/
  80. $(INSTALL_DATA) ./files/hplib.conf $(1)/etc/sane.d/dll.d/hplib
  81. $(INSTALL_DIR) $(1)/usr/share/sane
  82. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/sane/03f0-hplip.usbid \
  83. $(1)/usr/share/sane/03f0-hplip.usbid
  84. endef
  85. define Package/hplip-common/conffiles
  86. /etc/hp/hplip.conf
  87. endef
  88. define Package/hplip-sane/conffiles
  89. /etc/sane.d/dll.d/hplib
  90. endef
  91. $(eval $(call BuildPackage,hplip-common))
  92. $(eval $(call BuildPackage,hplip-sane))