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.

194 lines
5.2 KiB

  1. #
  2. # Copyright (C) 2014-2015 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
  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:=knot
  9. PKG_VERSION:=1.6.5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
  14. PKG_MD5SUM:=934b6feaeefd0df7b3be6709e39b19ce
  15. PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
  16. PKG_LICENSE:=GPL-2.0+
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/knot/Default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. TITLE:=Knot DNS
  25. URL:=https://www.knot-dns.cz
  26. SUBMENU:=IP Addresses and Names
  27. DEPENDS:=+libopenssl +liburcu
  28. endef
  29. define Package/knot-libknot
  30. $(call Package/knot/Default)
  31. TITLE+= (library)
  32. endef
  33. define Package/knot
  34. $(call Package/knot/Default)
  35. TITLE+= (server)
  36. DEPENDS+=+knot-libknot
  37. endef
  38. define Package/knot-dig
  39. $(call Package/knot/Default)
  40. TITLE+= lookup utility
  41. DEPENDS+=+knot-libknot
  42. endef
  43. define Package/knot-host
  44. $(call Package/knot/Default)
  45. TITLE+= simple DNS lookup utility
  46. DEPENDS+=+knot-libknot
  47. endef
  48. define Package/knot-nsec3hash
  49. $(call Package/knot/Default)
  50. TITLE+= simple NSEC3 hash utility
  51. DEPENDS+=+knot-libknot
  52. endef
  53. define Package/knot-nsupdate
  54. $(call Package/knot/Default)
  55. TITLE+= dynamic DNS update utility
  56. DEPENDS+=+knot-libknot
  57. endef
  58. define Package/knot-tests
  59. $(call Package/knot/Default)
  60. TITLE+= (tests)
  61. DEPENDS+=+knot-libknot
  62. endef
  63. define Package/knot-libknot/description
  64. Knot DNS library.
  65. endef
  66. define Package/knot/description
  67. High-performance authoritative-only DNS server.
  68. endef
  69. define Package/knot-dig/description
  70. Knot DNS lookup utility.
  71. endef
  72. define Package/knot-host/description
  73. Knot DNS simple DNS lookup utility.
  74. endef
  75. define Package/knot-nsec3hash/description
  76. Knot DNS simple utility to compute NSEC3 hash.
  77. endef
  78. define Package/knot-nsupdate/description
  79. Knot DNS dynamic DNS update utility.
  80. endef
  81. define Package/knot-tests/description
  82. Unit tests for Knot DNS server.
  83. Usage: /usr/share/knot/runtests.sh
  84. endef
  85. define Package/knot/conffiles
  86. /etc/knot/knot.conf
  87. endef
  88. CONFIGURE_ARGS += \
  89. --enable-recvmmsg=no \
  90. --disable-fastparser \
  91. --without-libidn \
  92. --with-rundir=/var/run \
  93. --with-storage=/etc/knot
  94. TARGET_CFLAGS += -std=gnu99 -DPSELECT_COMPAT
  95. define Build/Compile
  96. $(MAKE) -C $(PKG_BUILD_DIR)
  97. $(MAKE) -C $(PKG_BUILD_DIR)/libtap check
  98. $(MAKE) -C $(PKG_BUILD_DIR)/tests check-compile-only
  99. $(MAKE) -C $(PKG_BUILD_DIR)/src/zscanner check-compile-only
  100. endef
  101. define Package/knot-libknot/install
  102. $(INSTALL_DIR) $(1)/usr/lib
  103. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libknot.so.* $(1)/usr/lib/
  104. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzscanner.so.* $(1)/usr/lib/
  105. endef
  106. define Package/knot/install
  107. $(INSTALL_DIR) $(1)/usr/sbin
  108. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/knotc $(1)/usr/sbin/
  109. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/knotd $(1)/usr/sbin/
  110. $(INSTALL_DIR) $(1)/etc/knot
  111. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/knot/knot.sample.conf $(1)/etc/knot/knot.conf
  112. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/knot/example.com.zone $(1)/etc/knot/
  113. $(INSTALL_DIR) $(1)/etc/init.d
  114. $(INSTALL_BIN) ./files/knotd.init $(1)/etc/init.d/knotd
  115. endef
  116. define Package/knot-dig/install
  117. $(INSTALL_DIR) $(1)/usr/bin
  118. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdig $(1)/usr/bin/
  119. endef
  120. define Package/knot-host/install
  121. $(INSTALL_DIR) $(1)/usr/bin
  122. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/khost $(1)/usr/bin/
  123. endef
  124. define Package/knot-nsec3hash/install
  125. $(INSTALL_DIR) $(1)/usr/bin
  126. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsec3hash $(1)/usr/bin/
  127. endef
  128. define Package/knot-nsupdate/install
  129. $(INSTALL_DIR) $(1)/usr/bin
  130. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsupdate $(1)/usr/bin/
  131. endef
  132. define Package/knot-tests/install
  133. $(INSTALL_DIR) $(1)/usr/share/knot
  134. $(INSTALL_BIN) ./files/runtests.sh $(1)/usr/share/knot/
  135. $(INSTALL_DIR) $(1)/usr/share/knot/tap
  136. $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/runtests $(1)/usr/share/knot/tap/
  137. $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/tap/libtap.sh $(1)/usr/share/knot/tap/
  138. $(INSTALL_DIR) $(1)/usr/share/knot/tests
  139. find $(PKG_BUILD_DIR)/tests/.libs -maxdepth 1 -executable -type f | \
  140. xargs -I{} basename {} | \
  141. xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/.libs/{} $(1)/usr/share/knot/tests/test_{}
  142. $(INSTALL_DIR) $(1)/usr/share/knot/tests/data
  143. $(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/data/sample_conf $(1)/usr/share/knot/tests/data/
  144. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/.libs/zscanner-tool $(1)/usr/share/knot/tests/
  145. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/unittests $(1)/usr/share/knot/tests/test_zscanner
  146. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/zscanner/tests/TESTS $(1)/usr/share/knot/tests/
  147. cp -a $(PKG_BUILD_DIR)/src/zscanner/tests/data $(1)/usr/share/knot/tests/
  148. endef
  149. $(eval $(call BuildPackage,knot-libknot))
  150. $(eval $(call BuildPackage,knot))
  151. $(eval $(call BuildPackage,knot-dig))
  152. $(eval $(call BuildPackage,knot-host))
  153. $(eval $(call BuildPackage,knot-nsec3hash))
  154. $(eval $(call BuildPackage,knot-nsupdate))
  155. $(eval $(call BuildPackage,knot-tests))