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.

80 lines
1.9 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.8.1
  8. PKG_RELEASE:=$(AUTORELEASE)
  9. PKG_SOURCE_PROTO:=git
  10. PKG_SOURCE_URL:=https://github.com/zerotier/ZeroTierOne.git
  11. PKG_SOURCE_DATE:=2021-11-05
  12. PKG_SOURCE_VERSION:=7a626abf156a9dbac45a14061e5e1a182083a61c
  13. PKG_MIRROR_HASH:=b98ca72e72ee4ad8f9fed2ddb14599c94a9e78fd5f44fd9920b4b0e5c6f9dcf7
  14. PKG_MAINTAINER:=Moritz Warning <moritzwarning@web.de>
  15. PKG_LICENSE:=BSL 1.1
  16. PKG_LICENSE_FILES:=LICENSE.txt
  17. PKG_ASLR_PIE:=0
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/zerotier
  21. SECTION:=net
  22. CATEGORY:=Network
  23. DEPENDS:=+libpthread +libstdcpp +kmod-tun +ip +libminiupnpc +libnatpmp
  24. TITLE:=Create flat virtual Ethernet networks of almost unlimited size
  25. URL:=https://www.zerotier.com
  26. SUBMENU:=VPN
  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_DEBUG),y)
  35. MAKE_FLAGS += ZT_DEBUG=1
  36. endif
  37. MAKE_FLAGS += \
  38. DEFS="" \
  39. OSTYPE="Linux" \
  40. define Build/Compile
  41. $(call Build/Compile/Default,one)
  42. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  43. $(call Build/Compile/Default,selftest)
  44. endif
  45. endef
  46. # Make binary smaller
  47. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  48. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  49. define Package/zerotier/conffiles
  50. /etc/config/zerotier
  51. endef
  52. define Package/zerotier/install
  53. $(INSTALL_DIR) $(1)/usr/bin
  54. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-one $(1)/usr/bin/
  55. $(LN) zerotier-one $(1)/usr/bin/zerotier-cli
  56. $(LN) zerotier-one $(1)/usr/bin/zerotier-idtool
  57. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  58. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
  59. endif
  60. $(CP) ./files/* $(1)/
  61. endef
  62. $(eval $(call BuildPackage,zerotier))