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.

93 lines
2.1 KiB

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