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