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.

79 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:=zerotier
  7. PKG_VERSION:=1.2.2
  8. PKG_RELEASE:=4
  9. PKG_LICENSE:=GPL-3.0
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/zerotier/ZeroTierOne
  12. PKG_SOURCE_SUBDIR:=ZeroTierOne-$(PKG_VERSION)
  13. PKG_SOURCE_VERSION:=cfe0d0971f3ce5972d955250dc1ff6ec7a30e3f7
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  15. PKG_MIRROR_MD5SUM:=c8c3219c995a59161832d580a194f6280de7a4eef75cebece6f38400b64f003e
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/zerotier
  20. SECTION:=net
  21. CATEGORY:=Network
  22. DEPENDS:=+libpthread +kmod-tun +ip +libstdcpp +ZEROTIER_ENABLE_PORTMAPPING:libminiupnpc +ZEROTIER_ENABLE_PORTMAPPING:libnatpmp
  23. TITLE:=Create flat virtual Ethernet networks of almost unlimited size
  24. URL:=https://www.zerotier.com
  25. SUBMENU:=VPN
  26. MAINTAINER:=Moritz Warning <moritzwarning@web.de>
  27. endef
  28. define Package/zerotier/description
  29. ZeroTier creates a global provider-independent virtual private cloud network.
  30. endef
  31. define Package/zerotier/config
  32. source "$(SOURCE)/Config.in"
  33. endef
  34. ifeq ($(CONFIG_ZEROTIER_ENABLE_CLUSTER),y)
  35. MAKE_FLAGS += ZT_ENABLE_CLUSTER=1
  36. endif
  37. ifeq ($(CONFIG_ZEROTIER_ENABLE_PORTMAPPING),y)
  38. MAKE_FLAGS += ZT_ENABLE_PORTMAPPING=1
  39. endif
  40. ifeq ($(CONFIG_ZEROTIER_ENABLE_DEBUG),y)
  41. TARGET_CXXFLAGS += -DZT_TRACE -ggdb3
  42. endif
  43. define Build/Compile
  44. $(call Build/Compile/Default,one)
  45. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  46. $(call Build/Compile/Default,selftest)
  47. endif
  48. endef
  49. define Package/zerotier/install
  50. $(INSTALL_DIR) $(1)/usr/bin
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-one $(1)/usr/bin/
  52. $(LN) zerotier-one $(1)/usr/bin/zerotier-cli
  53. $(LN) zerotier-one $(1)/usr/bin/zerotier-idtool
  54. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  55. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
  56. endif
  57. $(INSTALL_DIR) $(1)/etc/init.d/
  58. $(INSTALL_BIN) files/zerotier.init $(1)/etc/init.d/zerotier
  59. $(INSTALL_DIR) $(1)/etc/config
  60. $(INSTALL_CONF) files/zerotier.config $(1)/etc/config/zerotier
  61. endef
  62. $(eval $(call BuildPackage,zerotier))