1
0

Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.4
  8. PKG_RELEASE:=3
  9. PKG_LICENSE:=GPL-3.0
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/zerotier/ZeroTierOne
  12. PKG_SOURCE_SUBDIR:=ZeroTierOne-$(PKG_VERSION)
  13. PKG_SOURCE_VERSION:=fe5257df81c4ec4b5d48f707eb794de0748b7ac0
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  15. PKG_MIRROR_HASH:=131436529d26f8eb975a0a8705b489cc22a1139c323755895c1776db579003bc
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
  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. MAINTAINER:=Moritz Warning <moritzwarning@web.de>
  27. endef
  28. define Package/zerotier/description
  29. ZeroTier creates a global provider-independent virtual private cloud network.
  30. endef
  31. define Package/zerotier/config
  32. source "$(SOURCE)/Config.in"
  33. endef
  34. ifeq ($(CONFIG_ZEROTIER_ENABLE_DEBUG),y)
  35. MAKE_FLAGS += ZT_DEBUG=1
  36. endif
  37. MAKE_FLAGS += \
  38. DEFS="" \
  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. 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))