getdns: Initial commit of openwrt package for getdns library
authorDavid Mora <iamperson347+public@gmail.com>
Sun, 14 Jan 2018 13:55:59 +0000 (08:55 -0500)
committerKarl Palsson <karlp@etactica.com>
Mon, 29 Jan 2018 10:45:16 +0000 (10:45 +0000)
Signed-off-by: David Mora <iamperson347+public@gmail.com>
libs/getdns/Config.in [new file with mode: 0644]
libs/getdns/Makefile [new file with mode: 0644]

diff --git a/libs/getdns/Config.in b/libs/getdns/Config.in
new file mode 100644 (file)
index 0000000..ea0786c
--- /dev/null
@@ -0,0 +1,16 @@
+menu "Configuration"
+       depends on PACKAGE_getdns
+
+config GETDNS_ENABLE_STUB_ONLY
+       bool "GETDNS_ENABLE_STUB_ONLY"
+       help
+               getdns can be configured for stub resolution mode only. (Removes libunbound dependency)
+       default y
+       
+config GETDNS_ENABLE_IDN
+       bool "GETDNS_ENABLE_IDN"
+       help 
+               getdns can be configured with some IDN Support. (Requires libidn dependency)
+       default n
+
+endmenu
diff --git a/libs/getdns/Makefile b/libs/getdns/Makefile
new file mode 100644 (file)
index 0000000..51e4a14
--- /dev/null
@@ -0,0 +1,73 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=getdns
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=David Mora <iamperson347+public@gmail.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://getdnsapi.net/dist/
+PKG_HASH:=920fa2e07c72fd0e5854db1820fa777108009fc5cb702f9aa5155ef58b12adb1
+
+PKG_FIXUP:=autoreconf
+
+PKG_INSTALL:=1
+
+PKG_CONFIG_DEPENDS:= \
+       CONFIG_GETDNS_ENABLE_STUB_ONLY \
+       CONFIG_GETDNS_ENABLE_IDN 
+       
+include $(INCLUDE_DIR)/package.mk
+
+define Package/getdns/Default
+       TITLE:=getdns
+       URL:=https://getdnsapi.net/
+endef
+
+define Package/getdns
+       $(call Package/getdns/Default)
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE+= (library)
+       DEPENDS+= +libopenssl +!GETDNS_ENABLE_STUB_ONLY:libunbound +GETDNS_ENABLE_IDN:libidn
+       MENU:=1
+endef
+
+define Package/getdns/description
+       This package contains the getdns library (libgetdns). 
+       This package also contains the "getdns_query" command line wrapper for getdns exposing the features of this implementation (both in the official API and the additional API functions).
+endef
+
+define Package/getdns/config
+       source "$(SOURCE)/Config.in"
+endef
+
+CONFIGURE_ARGS += \
+               $(if $(CONFIG_GETDNS_ENABLE_STUB_ONLY), --enable-stub-only, ) \
+               $(if $(CONFIG_GETDNS_ENABLE_IDN), , --without-libidn ) 
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/getdns/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/getdns/getdns*.h $(1)/usr/include/getdns/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgetdns*.{a,so*} $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/getdns*.pc $(1)/usr/lib/pkgconfig/
+endef
+       
+       
+define Package/getdns/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgetdns.so.* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/sbin    
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getdns_query $(1)/usr/sbin/getdns_query
+endef
+
+$(eval $(call BuildPackage,getdns))