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