[package] update confuse to 2.6 (#5375)
[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.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://bzero.se/confuse
16 PKG_MD5SUM:=0e883d66f0f58fc33585b430c652aa30
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
29 terms of the ISC license, and written in C. It supports sections and
30 (lists of) values (strings, integers, floats, booleans or other
31 sections), as well as some other features (such as single/double-quoted
32 strings, environment variable expansion, functions and nested include
33 statements). It makes it very easy to add configuration file capability
34 to a program using a simple API.
35
36 The goal of libConfuse is not to be the configuration file parser
37 library with a gazillion of features. Instead, it aims to be easy to use
38 and quick to integrate with your code. libConfuse was called libcfg
39 before, but was changed to not confuse with other similar libraries.
40 endef
41
42 TARGET_CFLAGS += $(FPIC)
43
44 CONFIGURE_ARGS += \
45 --enable-shared \
46 --enable-static \
47 --disable-rpath \
48 --without-libiconv-prefix \
49 --without-libintl-prefix \
50
51 MAKE_FLAGS += \
52 -C $(PKG_BUILD_DIR)/src \
53 DESTDIR="$(PKG_INSTALL_DIR)" \
54 all install \
55
56 define Build/InstallDev
57 mkdir -p $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/confuse.h $(1)/usr/include/
59 mkdir -p $(1)/usr/lib/pkgconfig
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.{a,so*} $(1)/usr/lib/
61 $(CP) $(PKG_BUILD_DIR)/*.pc $(1)/usr/lib/pkgconfig/
62 endef
63
64 define Build/UninstallDev
65 rm -rf \
66 $(STAGING_DIR)/usr/include/confuse.h \
67 $(STAGING_DIR)/usr/lib/libconfuse.{a,so*}
68 endef
69
70 define Package/confuse/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.so.* $(1)/usr/lib/
73 endef
74
75 $(eval $(call BuildPackage,confuse))