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.

96 lines
2.2 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=kadnode
  3. PKG_VERSION:=2.3.0
  4. PKG_RELEASE:=3
  5. PKG_SOURCE_URL:=https://codeload.github.com/mwarning/KadNode/tar.gz/v$(PKG_VERSION)?
  6. PKG_SOURCE:=kadnode-$(PKG_VERSION).tar.gz
  7. PKG_HASH:=abb2ca66fb525fab53157d5486bbb43e3a522a4bdc9280a3dcb8cb403ee08583
  8. PKG_BUILD_DIR:=$(BUILD_DIR)/KadNode-$(PKG_VERSION)
  9. PKG_MAINTAINER:=Moritz Warning <moritzwarning@web.de>
  10. PKG_LICENSE:=MIT
  11. PKG_BUILD_PARALLEL:=1
  12. include $(INCLUDE_DIR)/package.mk
  13. define Package/kadnode
  14. SECTION:=net
  15. CATEGORY:=Network
  16. TITLE:=P2P DNS Resolver
  17. SUBMENU:=IP Addresses and Names
  18. URL:=https://github.com/mwarning/KadNode
  19. MENU:=1
  20. DEPENDS:=+KADNODE_ENABLE_BOB:libmbedtls +KADNODE_ENABLE_TLS:libmbedtls +KADNODE_ENABLE_UPNP:libminiupnpc +KADNODE_ENABLE_NATPMP:libnatpmp
  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/conffiles
  58. /etc/config/kadnode
  59. endef
  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) 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))