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.

75 lines
2.1 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.4.2
  7. PKG_RELEASE:=1
  8. PKG_LICENSE:=BSD-3-Clause
  9. PKG_LICENSE_FILES:=LICENSE
  10. PKG_MAINTAINER:=David Mora <iamperson347+public@gmail.com>
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://getdnsapi.net/dist/
  13. PKG_HASH:=1685b82dfe297cffc4bae08a773cdc88a3edf9a4e5a1ea27d8764bb5affc0e80
  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. define Build/InstallDev
  45. $(INSTALL_DIR) $(1)/usr/include/getdns/
  46. $(CP) $(PKG_INSTALL_DIR)/usr/include/getdns/getdns*.h $(1)/usr/include/getdns/
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgetdns*.{a,so*} $(1)/usr/lib/
  49. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/getdns*.pc $(1)/usr/lib/pkgconfig/
  51. endef
  52. define Package/getdns/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgetdns.so.* $(1)/usr/lib/
  55. $(INSTALL_DIR) $(1)/usr/sbin
  56. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getdns_query $(1)/usr/sbin/getdns_query
  57. endef
  58. $(eval $(call BuildPackage,getdns))