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.

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