e94bd0f984d7d293ecd751edaf47ca534438c10d
[openwrt/svn-archive/archive.git] / libs / confuse / Makefile
1 #
2 # Copyright (C) 2006 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:=confuse
11 PKG_VERSION:=2.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/confuse/
16 PKG_MD5SUM:=4bc9b73d77ebd571ac834619ce0b3582
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/confuse
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=libConfuse is a configuration file parser library
24 URL:=http://www.nongnu.org/confuse/
25 endef
26
27 define Package/confuse/description
28 libConfuse is a configuration file parser library, licensed under the terms of the LGPL,
29 and written in C. It supports sections and (lists of) values (strings, integers, floats,
30 booleans or other sections), as well as some other features (such as single/double-quoted
31 strings, environment variable expansion, functions and nested include statements). It makes
32 it very easy to add configuration file capability to a program using a simple API.
33
34 The goal of libConfuse is not to be the configuration file parser library with a gazillion
35 of features. Instead, it aims to be easy to use and quick to integrate with your code.
36 libConfuse was called libcfg before, but was changed to not confuse with other similar libraries.
37 endef
38
39 TARGET_CFLAGS += $(FPIC)
40
41 CONFIGURE_ARGS += \
42 --enable-shared \
43 --enable-static \
44 --disable-rpath \
45 --without-libiconv-prefix \ --without-libintl-prefix \
46
47 MAKE_FLAGS += \
48 -C $(PKG_BUILD_DIR)/src \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 all install \
51
52 define Build/InstallDev
53 mkdir -p $(1)/usr/include
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/confuse.h $(1)/usr/include/
55 mkdir -p $(1)/usr/lib/pkgconfig
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.{a,so*} $(1)/usr/lib/
57 $(CP) $(PKG_BUILD_DIR)/*.pc $(1)/usr/lib/pkgconfig/
58 endef
59
60 define Build/UninstallDev
61 rm -rf \
62 $(STAGING_DIR)/usr/include/confuse.h \
63 $(STAGING_DIR)/usr/lib/libconfuse.{a,so*}
64 endef
65
66 define Package/confuse/install
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.so.* $(1)/usr/lib/
69 endef
70
71 $(eval $(call BuildPackage,confuse))