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.

92 lines
2.1 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=kadnode
  7. PKG_VERSION:=2.1.0
  8. PKG_RELEASE:=1
  9. PKG_BUILD_DIR:=$(BUILD_DIR)/KadNode-$(PKG_VERSION)
  10. PKG_SOURCE:=v$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://github.com/mwarning/KadNode/archive/
  12. PKG_HASH:=6d8022c8958c14cefbe0adca75f4d1101a586b5f1f0d7aab64c92ae54d864d98
  13. PKG_LICENSE:=MIT
  14. PKG_BUILD_PARALLEL:=1
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/kadnode
  17. SECTION:=net
  18. CATEGORY:=Network
  19. TITLE:=P2P DNS Resolver
  20. SUBMENU:=IP Addresses and Names
  21. URL:=https://github.com/mwarning/KadNode
  22. MENU:=1
  23. DEPENDS:=+KADNODE_ENABLE_BOB:libmbedtls +KADNODE_ENABLE_TLS:libmbedtls +KADNODE_ENABLE_UPNP:libminiupnpc +KADNODE_ENABLE_NATPMP:libnatpmp
  24. MAINTAINER:=Moritz Warning <moritzwarning@web.de>
  25. endef
  26. define Package/kadnode/description
  27. A P2P DNS system based on the BitTorrent network. It can be used as a decentralized DynDNS service.
  28. endef
  29. define Package/kadnode/config
  30. source "$(SOURCE)/Config.in"
  31. endef
  32. FEATURES =
  33. ifeq ($(CONFIG_KADNODE_ENABLE_CMD),y)
  34. FEATURES += cmd
  35. endif
  36. ifeq ($(CONFIG_KADNODE_ENABLE_LPD),y)
  37. FEATURES += lpd
  38. endif
  39. ifeq ($(CONFIG_KADNODE_ENABLE_TLS),y)
  40. FEATURES += tls
  41. endif
  42. ifeq ($(CONFIG_KADNODE_ENABLE_BOB),y)
  43. FEATURES += bob
  44. endif
  45. ifeq ($(CONFIG_KADNODE_ENABLE_DNS),y)
  46. FEATURES += dns
  47. endif
  48. ifeq ($(CONFIG_KADNODE_ENABLE_UPNP),y)
  49. FEATURES += upnp
  50. endif
  51. ifeq ($(CONFIG_KADNODE_ENABLE_NATPMP),y)
  52. FEATURES += natpmp
  53. endif
  54. ifeq ($(CONFIG_KADNODE_ENABLE_DEBUG),y)
  55. FEATURES += debug
  56. endif
  57. MAKE_FLAGS += FEATURES="$(FEATURES)"
  58. define Package/kadnode/install
  59. $(INSTALL_DIR) $(1)/usr/bin
  60. $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/kadnode $(1)/usr/bin/
  61. ifeq ($(CONFIG_KADNODE_ENABLE_CMD),y)
  62. $(LN) /usr/bin/kadnode $(1)/usr/bin/kadnode-ctl
  63. endif
  64. $(INSTALL_DIR) $(1)/etc/init.d
  65. $(INSTALL_BIN) files/kadnode.init $(1)/etc/init.d/kadnode
  66. $(INSTALL_DIR) $(1)/etc/config
  67. $(INSTALL_CONF) files/kadnode.config $(1)/etc/config/kadnode
  68. $(INSTALL_DIR) $(1)/etc/uci-defaults
  69. $(INSTALL_BIN) files/kadnode.postinst $(1)/etc/uci-defaults/99_kadnode
  70. endef
  71. $(eval $(call BuildPackage,kadnode))