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
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.6.2
  8. PKG_RELEASE:=2
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
  11. PKG_HASH:=c8087b26c1191d36fda004b42cdfed31042cafd8586e49015586eef786f2c9a5
  12. PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION)
  13. PKG_MAINTAINER:=Moritz Warning <moritzwarning@web.de>
  14. PKG_LICENSE:=BSL 1.1
  15. PKG_LICENSE_FILES:=LICENSE.txt
  16. PKG_ASLR_PIE:=0
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/zerotier
  20. SECTION:=net
  21. CATEGORY:=Network
  22. DEPENDS:=+libpthread +libstdcpp +kmod-tun +ip +libminiupnpc +libnatpmp
  23. TITLE:=Create flat virtual Ethernet networks of almost unlimited size
  24. URL:=https://www.zerotier.com
  25. SUBMENU:=VPN
  26. endef
  27. define Package/zerotier/description
  28. ZeroTier creates a global provider-independent virtual private cloud network.
  29. endef
  30. define Package/zerotier/config
  31. source "$(SOURCE)/Config.in"
  32. endef
  33. ifeq ($(CONFIG_ZEROTIER_ENABLE_DEBUG),y)
  34. MAKE_FLAGS += ZT_DEBUG=1
  35. endif
  36. MAKE_FLAGS += \
  37. DEFS="" \
  38. define Build/Compile
  39. $(call Build/Compile/Default,one)
  40. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  41. $(call Build/Compile/Default,selftest)
  42. endif
  43. endef
  44. # Make binary smaller
  45. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  46. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  47. define Package/zerotier/conffiles
  48. /etc/config/zerotier
  49. endef
  50. define Package/zerotier/install
  51. $(INSTALL_DIR) $(1)/usr/bin
  52. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-one $(1)/usr/bin/
  53. $(LN) zerotier-one $(1)/usr/bin/zerotier-cli
  54. $(LN) zerotier-one $(1)/usr/bin/zerotier-idtool
  55. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
  57. endif
  58. $(CP) ./files/* $(1)/
  59. endef
  60. $(eval $(call BuildPackage,zerotier))