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.

97 lines
2.3 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:=2
  9. PKG_LICENSE:=MIT
  10. PKG_SOURCE_URL:=https://codeload.github.com/mwarning/KadNode/tar.gz/v$(PKG_VERSION)?
  11. PKG_SOURCE:=KadNode-$(PKG_VERSION).tar.gz
  12. PKG_HASH:=1b3ccaa01cbb7548ef268d8b562059452826dc774529303c494418d1a450ca97
  13. PKG_BUILD_DIR:=$(BUILD_DIR)/KadNode-$(PKG_VERSION)
  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. # Make binary smaller
  59. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  60. TARGET_LDFLAGS += -Wl,--gc-sections
  61. define Package/kadnode/install
  62. $(INSTALL_DIR) $(1)/usr/bin
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/kadnode $(1)/usr/bin/
  64. ifeq ($(CONFIG_KADNODE_ENABLE_CMD),y)
  65. $(LN) /usr/bin/kadnode $(1)/usr/bin/kadnode-ctl
  66. endif
  67. $(INSTALL_DIR) $(1)/etc/init.d
  68. $(INSTALL_BIN) files/kadnode.init $(1)/etc/init.d/kadnode
  69. $(INSTALL_DIR) $(1)/etc/config
  70. $(INSTALL_CONF) files/kadnode.config $(1)/etc/config/kadnode
  71. $(INSTALL_DIR) $(1)/etc/uci-defaults
  72. $(INSTALL_BIN) files/kadnode.postinst $(1)/etc/uci-defaults/99_kadnode
  73. endef
  74. $(eval $(call BuildPackage,kadnode))