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.

114 lines
2.9 KiB

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