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.

83 lines
2.0 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.6
  8. PKG_RELEASE:=5
  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:=d1a0eeb03acfa446f67adf5901902d17de14b4648c21e160024acf476e3d4fba
  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. ifdef CONFIG_USE_UCLIBC
  48. TARGET_CFLAGS += -D'valloc(a)=aligned_alloc(getpagesize(),a)'
  49. endif
  50. define Package/zerotier/conffiles
  51. /etc/config/zerotier
  52. endef
  53. define Package/zerotier/install
  54. $(INSTALL_DIR) $(1)/usr/bin
  55. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-one $(1)/usr/bin/
  56. $(LN) zerotier-one $(1)/usr/bin/zerotier-cli
  57. $(LN) zerotier-one $(1)/usr/bin/zerotier-idtool
  58. ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y)
  59. $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
  60. endif
  61. $(CP) ./files/* $(1)/
  62. endef
  63. $(eval $(call BuildPackage,zerotier))