Makefile (2392B)
1 # 2 # Copyright (C) 2006-2014 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:=3.0 12 PKG_RELEASE:=1 13 14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz 15 PKG_SOURCE_URL:=https://github.com/martinh/libconfuse/releases/download/v$(PKG_VERSION) 16 PKG_HASH:=bb75174e02aa8b44fa1a872a47beeea1f5fe715ab669694c97803eb6127cc861 17 PKG_MAINTAINER:=Daniel Engberg <daniel.engberg.lists@pyret.net> 18 PKG_LICENSE:=ISC 19 20 PKG_FIXUP:=autoreconf 21 22 include $(INCLUDE_DIR)/package.mk 23 24 define Package/confuse 25 SECTION:=libs 26 CATEGORY:=Libraries 27 TITLE:=libConfuse is a configuration file parser library 28 URL:=https://github.com/martinh/libconfuse 29 endef 30 31 define Package/confuse/description 32 libConfuse is a configuration file parser library, licensed under the 33 terms of the ISC license, and written in C. It supports sections and 34 (lists of) values (strings, integers, floats, booleans or other 35 sections), as well as some other features (such as single/double-quoted 36 strings, environment variable expansion, functions and nested include 37 statements). It makes it very easy to add configuration file capability 38 to a program using a simple API. 39 40 The goal of libConfuse is not to be the configuration file parser 41 library with a gazillion of features. Instead, it aims to be easy to use 42 and quick to integrate with your code. libConfuse was called libcfg 43 before, but was changed to not confuse with other similar libraries. 44 endef 45 46 TARGET_CFLAGS += $(FPIC) 47 48 CONFIGURE_ARGS += \ 49 --enable-shared \ 50 --enable-static \ 51 --disable-rpath \ 52 --without-libiconv-prefix \ 53 --without-libintl-prefix \ 54 --disable-examples 55 56 MAKE_FLAGS += \ 57 -C $(PKG_BUILD_DIR)/src \ 58 DESTDIR="$(PKG_INSTALL_DIR)" \ 59 all install \ 60 61 define Build/InstallDev 62 $(INSTALL_DIR) $(1)/usr/include 63 $(CP) $(PKG_INSTALL_DIR)/usr/include/confuse.h $(1)/usr/include/ 64 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.{a,so*} $(1)/usr/lib/ 66 $(CP) $(PKG_BUILD_DIR)/*.pc $(1)/usr/lib/pkgconfig/ 67 endef 68 69 define Build/UninstallDev 70 rm -rf \ 71 $(STAGING_DIR)/usr/include/confuse.h \ 72 $(STAGING_DIR)/usr/lib/libconfuse.{a,so*} 73 endef 74 75 define Package/confuse/install 76 $(INSTALL_DIR) $(1)/usr/lib 77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.so.* $(1)/usr/lib/ 78 endef 79 80 $(eval $(call BuildPackage,confuse))