You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.3 KiB

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