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.

133 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2014-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=nsd
  9. PKG_VERSION:=4.2.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.nlnetlabs.nl/downloads/nsd
  13. PKG_HASH:=9ebd6d766765631a56c0eb332eac26b310fa39f662e5582c8210488cf91ef27c
  14. PKG_MAINTAINER:=Vasilis Tsiligiannis <acinonyx@openwrt.gr>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/nsd/default
  21. TITLE:=NSD Name Server Daemon
  22. URL:=https://www.nlnetlabs.nl/projects/nsd/
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=IP Addresses and Names
  26. endef
  27. define Package/nsd/default/description
  28. NSD is an authoritative only, high performance, simple and open source name
  29. server.
  30. endef
  31. define Package/nsd
  32. $(Package/nsd/default)
  33. TITLE += (with SSL support)
  34. DEPENDS += +libopenssl
  35. VARIANT:=ssl
  36. endef
  37. define Package/nsd/description
  38. $(Package/nsd/default/description)
  39. endef
  40. define Package/nsd-nossl
  41. $(Package/nsd/default)
  42. TITLE += (without SSL support)
  43. VARIANT:=nossl
  44. endef
  45. define Package/nsd-nossl/description
  46. $(Package/nsd/default/description)
  47. endef
  48. define Package/nsd-checkconf/description
  49. $(Package/nsd/default/description)
  50. endef
  51. define Package/nsd-control
  52. $(Package/nsd/default)
  53. TITLE += remote control utility
  54. DEPENDS += +libopenssl
  55. endef
  56. define Package/nsd-control/description
  57. $(Package/nsd/default/description)
  58. endef
  59. define Package/nsd-control-setup
  60. $(Package/nsd/default)
  61. TITLE += SSL keys setup script
  62. DEPENDS += +openssl-util
  63. endef
  64. define Package/nsd-control-setup/description
  65. $(Package/nsd/default/description)
  66. endef
  67. CONFIGURE_ARGS+= \
  68. --enable-packed \
  69. --enable-recvmmsg \
  70. --enable-tcp-fastopen \
  71. --disable-checking \
  72. --with-user="network" \
  73. --without-libevent \
  74. $(if $(CONFIG_IPV6),--with,--without)-ipv6
  75. CONFIGURE_VARS+= \
  76. ac_cv_c_va_list_def=no \
  77. ac_cv_c_strptime_needs_defs=no
  78. ifeq ($(BUILD_VARIANT),ssl)
  79. CONFIGURE_ARGS += --with-ssl="$(STAGING_DIR)/usr"
  80. else
  81. CONFIGURE_ARGS += --without-ssl
  82. endif
  83. define Package/nsd/conffiles
  84. /etc/nsd/
  85. endef
  86. define Package/nsd/install
  87. $(INSTALL_DIR) $(1)/usr/sbin
  88. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{nsd,nsd-checkconf} $(1)/usr/sbin/
  89. $(INSTALL_DIR) $(1)/etc/nsd
  90. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nsd/nsd.conf.sample $(1)/etc/nsd/nsd.conf
  91. $(INSTALL_DIR) $(1)/etc/init.d
  92. $(INSTALL_BIN) ./files/nsd.init $(1)/etc/init.d/nsd
  93. endef
  94. define Package/nsd-control/install
  95. $(INSTALL_DIR) $(1)/usr/sbin
  96. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nsd-control $(1)/usr/sbin/
  97. endef
  98. define Package/nsd-control-setup/install
  99. $(INSTALL_DIR) $(1)/usr/sbin
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nsd-control-setup $(1)/usr/sbin/
  101. endef
  102. Package/nsd-nossl/install = $(Package/nsd/install)
  103. Package/nsd-nossl/conffiles = $(Package/nsd/conffiles)
  104. $(eval $(call BuildPackage,nsd))
  105. $(eval $(call BuildPackage,nsd-nossl))
  106. $(eval $(call BuildPackage,nsd-control))
  107. $(eval $(call BuildPackage,nsd-control-setup))