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.

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