Add libinklevel (#4335), thanks Raphael
[openwrt/svn-archive/archive.git] / libs / libinklevel / Makefile
1 #
2 # Copyright (C) 2008 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: Makefile 12228 2008-08-06 22:43:15Z nbd $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libinklevel
12 PKG_VERSION:=0.7.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/libinklevel
17 PKG_MD5SUM:=c7ccefec29d1d218d1aae240f6044fe1
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libinklevel
22 SECTION:=libs
23 CATEGORY:=Libraries
24 DEPENDS:=$(if $(WITH_PARPORT), +libieee1284)
25 TITLE:=Printers Ink Level Library
26 URL:=http://libinklevel.sourceforge.net/
27 endef
28
29 define Package/libinklevel/description
30 Libinklevel is a library for checking the ink level of your printer on a system which runs Linux.
31 endef
32
33 TARGET_CFLAGS += $(FPIC)
34 TARGET_LIBS += $(if $(WITH_PARPORT), -lieee1284)
35
36 define Build/Compile
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 CC="$(TARGET_CC)" \
39 CFLAGS="$(TARGET_CFLAGS)" \
40 CPPFLAGS="$(TARGET_CPPFLAGS)" \
41 LDFLAGS="$(TARGET_LDFLAGS)" \
42 LIBS="$(TARGET_LIBS)" \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 all install
45 endef
46
47 define Build/InstallDev
48 $(INSTALL_DIR) $(1)/usr/include
49 $(INSTALL_DATA) \
50 $(PKG_INSTALL_DIR)/usr/include/inklevel.h \
51 $(1)/usr/include/
52
53 $(INSTALL_DIR) $(1)/usr/lib
54 $(CP) \
55 $(PKG_INSTALL_DIR)/usr/lib/libinklevel.so* \
56 $(1)/usr/lib/
57 endef
58
59 define Package/libinklevel/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) \
62 $(PKG_INSTALL_DIR)/usr/lib/libinklevel.so* \
63 $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,libinklevel))