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.

77 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.4.0.1
  8. PKG_RELEASE:=1
  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:=39f5cdbe589ff550dca9d407f579e87b55a750dbb46458914476fa7dbafb8214
  12. PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION)
  13. PKG_MAINTAINER:=Moritz Warning <moritzwarning@web.de>
  14. PKG_LICENSE:=GPL-3.0-or-later
  15. PKG_LICENSE_FILES:=LICENSE.txt
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/zerotier
  19. SECTION:=net
  20. CATEGORY:=Network
  21. DEPENDS:=+libpthread +libstdcpp +kmod-tun +ip +libminiupnpc +libnatpmp
  22. TITLE:=Create flat virtual Ethernet networks of almost unlimited size
  23. URL:=https://www.zerotier.com
  24. SUBMENU:=VPN
  25. endef
  26. define Package/zerotier/description
  27. ZeroTier creates a global provider-independent virtual private cloud network.
  28. endef
  29. define Package/zerotier/config
  30. source "$(SOURCE)/Config.in"
  31. endef
  32. ifeq ($(CONFIG_ZEROTIER_ENABLE_DEBUG),y)
  33. MAKE_FLAGS += ZT_DEBUG=1
  34. endif
  35. MAKE_FLAGS += \
  36. DEFS="" \
  37. define Build/Compile
  38. $(call Build/Compile/Default,one)
  39. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  40. $(call Build/Compile/Default,selftest)
  41. endif
  42. endef
  43. # Make binary smaller
  44. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  45. TARGET_LDFLAGS += -Wl,--gc-sections
  46. define Package/zerotier/conffiles
  47. /etc/config/zerotier
  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. $(CP) ./files/* $(1)/
  58. endef
  59. $(eval $(call BuildPackage,zerotier))