add hplip (based on a patch by Evan Felix)
[packages.git] / utils / hplip / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=hplip
12 PKG_VERSION:=2.7.12
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/hplip
17 PKG_MD5SUM:=ba00337ccf1b520509518bffbec960db
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_BUILD_DEPENDS := python
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/hplip
25   SECTION:=utils
26   CATEGORY:=Utilities
27   TITLE:=HP Linux Imaging and Printing
28   URL:=http://sourceforge.net/projects/hplip/
29   DEPENDS+=+libjpeg +sane-libs +cups +libusb
30 endef
31
32 define Package/hplip/description
33         HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.
34 endef
35
36 CONFIGURE_ARGS += \
37         --disable-gui-build \
38         --disable-network-build \
39         --disable-fax-build \
40         --disable-pp-build \
41         --disable-doc-build \
42         --disable-foomatic-xml-install
43
44 define Package/hplip/install
45         $(INSTALL_DIR) $(1)/usr/lib
46         $(CP) $(PKG_BUILD_DIR)/.libs/libhpip.so* $(1)/usr/lib/
47         $(CP) $(PKG_BUILD_DIR)/.libs/libhpmud.so* $(1)/usr/lib/
48         
49         $(INSTALL_DIR) $(1)/usr/lib/cups/backend
50         $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/hp $(1)/usr/lib/cups/backend
51
52         $(INSTALL_DIR) $(1)/usr/lib/sane
53         $(CP) $(PKG_BUILD_DIR)/.libs/libsane-hpaio.so* $(1)/usr/lib/sane
54
55         $(INSTALL_DIR) $(1)/etc/hp
56         $(CP) $(PKG_BUILD_DIR)/hplip.conf $(1)/etc/hp/hplip.conf
57
58         $(INSTALL_DIR) $(1)/usr/share/hplip/data/models/
59         $(CP) $(PKG_BUILD_DIR)/data/models/models.dat $(1)/usr/share/hplip/data/models/
60 endef
61
62 $(eval $(call BuildPackage,hplip))