summaryrefslogtreecommitdiffstats
path: root/libs/confuse/Makefile
blob: b521033c586ff57a741c30a9fc58ebc5a472ec14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=confuse
PKG_VERSION:=3.4
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/martinh/libconfuse/releases/download/v$(PKG_VERSION)
PKG_HASH:=36bfa3928f9c323914c7c8317e8722cb22f41db69d7c9d4c24b4689fa955445d

PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:libconfuse_project:libconfuse

PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define Package/confuse
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=libConfuse is a configuration file parser library
  URL:=https://github.com/martinh/libconfuse
endef

define Package/confuse/description
	libConfuse is a configuration file parser library, licensed under the
	terms of the ISC license, and written in C. It supports sections and
	(lists of) values (strings, integers, floats, booleans or other
	sections), as well as some other features (such as single/double-quoted
	strings, environment variable expansion, functions and nested include
	statements). It makes it very easy to add configuration file capability
	to a program using a simple API.

	The goal of libConfuse is not to be the configuration file parser
	library with a gazillion of features. Instead, it aims to be easy to use
	and quick to integrate with your code. libConfuse was called libcfg
	before, but was changed to not confuse with other similar libraries.
endef

CONFIGURE_ARGS += \
	--enable-shared \
	--enable-static \
	--disable-rpath \
	--without-libiconv-prefix \
	--without-libintl-prefix \
	--disable-examples \
	--with-pic

define Build/InstallDev
	$(INSTALL_DIR) $(1)/usr/include
	$(CP) $(PKG_INSTALL_DIR)/usr/include/confuse.h $(1)/usr/include/
	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.{a,so*} $(1)/usr/lib/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libconfuse.pc $(1)/usr/lib/pkgconfig/
endef

define Package/confuse/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,confuse))