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.

126 lines
2.9 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=dnsdist
  3. PKG_VERSION:=1.4.0
  4. PKG_RELEASE:=3
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  6. PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/
  7. PKG_HASH:=a336fa2c3eb381c2464d9d9790014fd6d4505029ed2c1b73ee1dc9115a2f1dc0
  8. PKG_MAINTAINER:=James Taylor <james@jtaylor.id.au>
  9. PKG_LICENSE:=GPL-2.0-only
  10. PKG_LICENSE_FILES:=COPYING
  11. PKG_CPE_ID:=cpe:/a:powerdns:dnsdist
  12. PKG_INSTALL:=1
  13. PKG_BUILD_DEPENDS:=protobuf/host
  14. PKG_CONFIG_DEPENDS:= \
  15. CONFIG_DNSDIST_GNUTLS \
  16. CONFIG_DNSDIST_OPENSSL
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/dnsdist/config
  19. menu "Configuration"
  20. depends on PACKAGE_dnsdist
  21. comment "SSL Support"
  22. choice
  23. prompt "Selected SSL library"
  24. default DNSDIST_OPENSSSL
  25. config DNSDIST_OPENSSL
  26. bool "OpenSSL"
  27. config DNSDIST_GNUTLS
  28. bool "GnuTLS"
  29. config DNSDIST_NOSSL
  30. bool "No SSL support"
  31. endchoice
  32. comment "DNS over HTTPS/TLS Support"
  33. depends on !DNSDIST_NOSSL
  34. config DNSDIST_DNS_OVER_HTTPS
  35. depends on DNSDIST_OPENSSL
  36. depends on !DNSDIST_NOSSL
  37. bool "DNS over HTTPS Support"
  38. help
  39. "Enables DNS over HTTPS Support for dnsdist"
  40. default y
  41. config DNSDIST_DNS_OVER_TLS
  42. depends on !DNSDIST_NOSSL
  43. bool "DNS over TLS Support"
  44. help
  45. "Enabled DNS over TLS Support for dnsdist"
  46. default y
  47. endmenu
  48. endef
  49. define Package/dnsdist
  50. SECTION:=net
  51. CATEGORY:=Network
  52. SUBMENU:=IP Addresses and Names
  53. TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer
  54. DEPENDS:= \
  55. +DNSDIST_DNS_OVER_HTTPS:libh2o-evloop \
  56. +DNSDIST_GNUTLS:libgnutls \
  57. +DNSDIST_OPENSSL:libopenssl \
  58. +boost \
  59. +libatomic \
  60. +libcap \
  61. +libedit \
  62. +libfstrm \
  63. +libnetsnmp \
  64. +libsodium \
  65. +lmdb \
  66. +lua \
  67. +protobuf \
  68. +re2 \
  69. +tinycdb
  70. URL:=https://dnsdist.org/
  71. endef
  72. define Package/dnsdist/description
  73. dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life
  74. is to route traffic to the best server, delivering top performance to legitimate
  75. users while shunting or blocking abusive traffic.
  76. endef
  77. define Package/dnsdist/conffiles
  78. /etc/dnsdist.conf
  79. /etc/config/dnsdist
  80. /etc/init.d/dnsdist
  81. endef
  82. CONFIGURE_ARGS+= \
  83. --enable-dnscrypt \
  84. --enable-dnstap \
  85. --with-libsodium \
  86. --with-protobuf \
  87. --with-re2 \
  88. --with-lua=lua \
  89. --with-net-snmp \
  90. $(if $(CONFIG_DNSDIST_GNUTLS),--with,--without)-gnutls \
  91. $(if $(CONFIG_DNSDIST_OPENSSL),--with,--without)-libssl \
  92. $(if $(CONFIG_DNSDIST_DNS_OVER_TLS),--enable-dns-over-tls,) \
  93. $(if $(CONFIG_DNSDIST_DNS_OVER_HTTPS),--enable-dns-over-https,)
  94. define Package/dnsdist/install
  95. $(INSTALL_DIR) $(1)/etc
  96. $(INSTALL_CONF) ./files/dnsdist.conf $(1)/etc/dnsdist.conf
  97. $(INSTALL_DIR) $(1)/etc/config
  98. $(INSTALL_CONF) ./files/dnsdist.config $(1)/etc/config/dnsdist
  99. $(INSTALL_DIR) $(1)/etc/init.d
  100. $(INSTALL_BIN) ./files/dnsdist.init $(1)/etc/init.d/dnsdist
  101. $(INSTALL_DIR) $(1)/usr/bin
  102. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnsdist $(1)/usr/bin/
  103. endef
  104. $(eval $(call BuildPackage,dnsdist))