[package] update libconfig to 1.4 (#6238)
[openwrt/svn-archive/archive.git] / libs / libconfig / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libconfig
11 PKG_VERSION:=1.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.hyperrealm.com/libconfig/
16 PKG_MD5SUM:=c6b1c6ccb1a35b93ebf771779d915181
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libconfig
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=Configuration File Library
24 URL:=http://www.hyperrealm.com/libconfig/
25 endef
26
27 define Package/libconfig/description
28 Libconfig is a simple library for manipulating structured
29 configuration files. This file format is more compact and more
30 readable than XML. And unlike XML, it is type-aware, so it is not
31 necessary to do string parsing in application code.
32
33 Libconfig is very compact -- just 38K for the stripped C shared
34 library (less than one-fourth the size of the expat XML parser
35 library) and 66K for the stripped C++ shared library. This makes
36 it well-suited for memory-constrained systems like handheld devices.
37 endef
38
39 CONFIGURE_ARGS += \
40 --enable-shared \
41 --enable-static \
42 --disable-cxx
43
44 MAKE_FLAGS += \
45 CFLAGS="$(TARGET_CFLAGS)" \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
48
49 define Build/InstallDev
50 mkdir -p $(1)/usr/include/libconfig/
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/libconfig.h $(1)/usr/include/libconfig/
52 mkdir -p $(1)/usr/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.{a,so} $(1)/usr/lib/
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so* $(1)/usr/lib/
55 endef
56
57 define Package/libconfig/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so.* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,libconfig))