7d01293fc42dfe8cf0bbc4105d3180cf0f0f3e27
[packages.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.3
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:=295f580a7bc3a03a44d520d6ace55ee6
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libconfig
23   SECTION:=libs
24   CATEGORY:=Libraries
25   TITLE:=Configuration File Library
26   URL:=http://www.hyperrealm.com/libconfig/
27 endef
28
29 define Package/libconfig/description
30         Libconfig is a simple library for manipulating structured
31         configuration files. This file format is more compact and more
32         readable than XML. And unlike XML, it is type-aware, so it is not
33         necessary to do string parsing in application code.
34
35         Libconfig is very compact -- just 38K for the stripped C shared
36         library (less than one-fourth the size of the expat XML parser
37         library) and 66K for the stripped C++ shared library. This makes
38         it well-suited for memory-constrained systems like handheld devices.
39 endef
40
41 CONFIGURE_ARGS += \
42         --enable-shared \
43         --enable-static \
44         --disable-cxx
45
46 define Build/InstallDev
47         $(INSTALL_DIR) $(1)/usr/include/libconfig/
48         $(CP) $(PKG_INSTALL_DIR)/usr/include/libconfig.h $(1)/usr/include/libconfig/
49         $(INSTALL_DIR) $(1)/usr/lib
50         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.{a,so} $(1)/usr/lib/
51         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so* $(1)/usr/lib/
52 endef
53
54 define Package/libconfig/install
55         $(INSTALL_DIR) $(1)/usr/lib
56         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so.* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,libconfig))