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.6.6
  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:=6c95ffca4a64bf948abbf3e550a0c4881b17cf45ff2f55e2a389d095f9be81a5
  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. OSTYPE="Linux" \
  39. define Build/Compile
  40. $(call Build/Compile/Default,one)
  41. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  42. $(call Build/Compile/Default,selftest)
  43. endif
  44. endef
  45. # Make binary smaller
  46. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  47. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  48. define Package/zerotier/conffiles
  49. /etc/config/zerotier
  50. endef
  51. define Package/zerotier/install
  52. $(INSTALL_DIR) $(1)/usr/bin
  53. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-one $(1)/usr/bin/
  54. $(LN) zerotier-one $(1)/usr/bin/zerotier-cli
  55. $(LN) zerotier-one $(1)/usr/bin/zerotier-idtool
  56. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
  58. endif
  59. $(CP) ./files/* $(1)/
  60. endef
  61. $(eval $(call BuildPackage,zerotier))