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.

84 lines
2.2 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=dnsdist
  3. PKG_VERSION:=1.3.3
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  6. PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
  7. PKG_HASH:=9fb24f9032025955169f3c6e9b0a05b6aa9d6441ec47da08d22de1c1aa23e8cf
  8. PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
  9. PKG_LICENSE:=GPL-2.0-only
  10. PKG_LICENSE_FILES:=COPYING
  11. PKG_INSTALL:=1
  12. PKG_CONFIG_DEPENDS:= \
  13. CONFIG_DNSDIST_GNUTLS \
  14. CONFIG_DNSDIST_OPENSSL
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/dnsdist/config
  17. comment "SSL support"
  18. choice
  19. prompt "Selected SSL library"
  20. default DNSDIST_OPENSSSL
  21. config DNSDIST_OPENSSL
  22. bool "OpenSSL"
  23. config DNSDIST_GNUTLS
  24. bool "GnuTLS"
  25. config DNSDIST_NOSSL
  26. bool "No SSL support"
  27. endchoice
  28. endef
  29. define Package/dnsdist
  30. SECTION:=base
  31. CATEGORY:=Network
  32. TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer
  33. DEPENDS:=+DNSDIST_OPENSSL:libopenssl +DNSDIST_GNUTLS:libgnutls +protobuf +re2 +libedit +libfstrm +libsodium +lua +boost +libnetsnmp
  34. URL:=https://dnsdist.org/
  35. endef
  36. define Package/dnsdist/description
  37. dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life
  38. is to route traffic to the best server, delivering top performance to legitimate
  39. users while shunting or blocking abusive traffic.
  40. endef
  41. define Package/dnsdist/conffiles
  42. /etc/dnsdist.conf
  43. /etc/config/dnsdist
  44. /etc/init.d/dnsdist
  45. endef
  46. CONFIGURE_ARGS+= \
  47. --enable-dnscrypt \
  48. $(if $(CONFIG_DNSDIST_NOSSL),,--enable-dns-over-tls) \
  49. --enable-fstrm \
  50. --enable-libsodium \
  51. --enable-protobuf \
  52. --enable-re2 \
  53. --with-net-snmp \
  54. $(if $(CONFIG_DNSDIST_GNUTLS),--enable,--disable)-gnutls \
  55. $(if $(CONFIG_DNSDIST_OPENSSL),--enable,--disable)-libssl
  56. define Package/dnsdist/install
  57. $(INSTALL_DIR) $(1)/etc
  58. $(INSTALL_CONF) ./files/dnsdist.conf $(1)/etc/dnsdist.conf
  59. $(INSTALL_DIR) $(1)/etc/config
  60. $(INSTALL_CONF) ./files/dnsdist.config $(1)/etc/config/dnsdist
  61. $(INSTALL_DIR) $(1)/etc/init.d
  62. $(INSTALL_BIN) ./files/dnsdist.init $(1)/etc/init.d/dnsdist
  63. $(INSTALL_DIR) $(1)/usr/bin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnsdist $(1)/usr/bin/
  65. endef
  66. $(eval $(call BuildPackage,dnsdist))