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.

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