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. # This is free software, licensed under the GNU General Public License v2.
  2. # See /LICENSE for more information.
  3. #
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=getdns
  6. PKG_VERSION:=1.5.2
  7. PKG_RELEASE:=1
  8. PKG_LICENSE:=BSD-3-Clause
  9. PKG_LICENSE_FILES:=LICENSE
  10. PKG_MAINTAINER:=Jonathan Underwood <jonathan.underwood@gmail.com>
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://getdnsapi.net/dist/
  13. PKG_HASH:=1826a6a221ea9e9301f2c1f5d25f6f5588e841f08b967645bf50c53b970694c0
  14. PKG_FIXUP:=autoreconf
  15. PKG_INSTALL:=1
  16. PKG_CONFIG_DEPENDS:= \
  17. CONFIG_GETDNS_ENABLE_STUB_ONLY \
  18. CONFIG_GETDNS_ENABLE_IDN_LIBIDN2
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/getdns/Default
  21. TITLE:=getdns
  22. URL:=https://getdnsapi.net/
  23. endef
  24. define Package/getdns
  25. $(call Package/getdns/Default)
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE+= (library)
  29. DEPENDS+= +libopenssl +!GETDNS_ENABLE_STUB_ONLY:libunbound +GETDNS_ENABLE_IDN_LIBIDN2:libidn2
  30. MENU:=1
  31. endef
  32. define Package/getdns/description
  33. This package contains the getdns library (libgetdns).
  34. 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).
  35. endef
  36. define Package/getdns/config
  37. source "$(SOURCE)/Config.in"
  38. endef
  39. CONFIGURE_ARGS += \
  40. $(if $(CONFIG_GETDNS_ENABLE_STUB_ONLY), --enable-stub-only, ) \
  41. --without-libidn \
  42. $(if $(CONFIG_GETDNS_ENABLE_IDN_LIBIDN2), , --without-libidn2 ) \
  43. --with-ssl="$(STAGING_DIR)/usr" \
  44. # This will make 'configure' think that our libbsd.so is missing the
  45. # functions inet_pton, inet_ntop, strlcpy and use the builtin. This
  46. # removes the libbsd dependency
  47. CONFIGURE_VARS += LIBBSD_LIBS=-lc
  48. define Build/InstallDev
  49. $(INSTALL_DIR) $(1)/usr/include/getdns/
  50. $(CP) $(PKG_INSTALL_DIR)/usr/include/getdns/getdns*.h $(1)/usr/include/getdns/
  51. $(INSTALL_DIR) $(1)/usr/lib
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgetdns*.{a,so*} $(1)/usr/lib/
  53. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/getdns*.pc $(1)/usr/lib/pkgconfig/
  55. endef
  56. define Package/getdns/install
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgetdns.so.* $(1)/usr/lib/
  59. $(INSTALL_DIR) $(1)/usr/sbin
  60. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getdns_query $(1)/usr/sbin/getdns_query
  61. endef
  62. $(eval $(call BuildPackage,getdns))