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.

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