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.

135 lines
3.0 KiB

  1. #
  2. # Copyright (C) 2014 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.0.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/nsd
  13. PKG_MD5SUM:=9331dd18478295206775433a0b23e490
  14. PKG_FIXUP:=autoreconf
  15. PKG_INSTALL:=1
  16. PKG_LICENSE:=BSD-3c
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_MAINTAINER:=Vasilis Tsiligiannis <acinonyx@openwrt.gr>
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/nsd/default
  22. TITLE:=NSD Name Server Daemon
  23. URL:=http://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. --disable-checking \
  70. --with-libevent=no \
  71. --with-user="network" \
  72. CONFIGURE_VARS+= \
  73. ac_cv_c_va_list_def=no \
  74. ac_cv_c_strptime_needs_defs=no \
  75. ifeq ($(BUILD_VARIANT),ssl)
  76. CONFIGURE_ARGS += \
  77. --with-ssl="$(STAGING_DIR)/usr"
  78. endif
  79. ifeq ($(BUILD_VARIANT),nossl)
  80. CONFIGURE_ARGS += \
  81. --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))