From: florian Date: Sat, 1 Nov 2008 16:09:01 +0000 (+0000) Subject: Add libconfig package from #4155 X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=f1032571f20e17d2997aca4e5e828377ea8d5626;p=packages.git Add libconfig package from #4155 git-svn-id: svn://svn.openwrt.org/openwrt/packages@13091 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/libs/libconfig/Makefile b/libs/libconfig/Makefile new file mode 100644 index 000000000..d4fb4479e --- /dev/null +++ b/libs/libconfig/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libconfig +PKG_VERSION:=1.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.hyperrealm.com/libconfig/ +PKG_MD5SUM:=00f2ebfacb5a0b7b02b409b751432b80 + +include $(INCLUDE_DIR)/package.mk + +define Package/libconfig + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Configuration File Library + URL:=http://www.hyperrealm.com/libconfig/ +endef + +define Package/libconfig/description + Libconfig is a simple library for manipulating structured + configuration files. This file format is more compact and more + readable than XML. And unlike XML, it is type-aware, so it is not + necessary to do string parsing in application code. + + Libconfig is very compact -- just 38K for the stripped C shared + library (less than one-fourth the size of the expat XML parser + library) and 66K for the stripped C++ shared library. This makes + it well-suited for memory-constrained systems like handheld devices. +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-cxx + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install + +define Build/InstallDev + mkdir -p $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/libconfig.h $(1)/usr/include/ + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.{a,so} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so* $(1)/usr/lib/ +endef + +define Package/libconfig/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libconfig))