Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=Xray-core
  3. PKG_VERSION:=1.5.4
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/XTLS/xray-core/tar.gz/v$(PKG_VERSION)?
  7. PKG_HASH:=af9b9b5b0a2d4f055d19f3580d1c2d3141bbaab9dd7824428c12ae0ced5f511e
  8. PKG_MAINTAINER:=Tianling Shen <[email protected]>
  9. PKG_LICENSE:=MPL-2.0
  10. PKG_LICENSE_FILES:=LICENSE
  11. PKG_BUILD_DEPENDS:=golang/host
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_USE_MIPS16:=0
  14. GO_PKG:=github.com/xtls/xray-core
  15. GO_PKG_BUILD_PKG:=$(GO_PKG)/main
  16. GO_PKG_LDFLAGS_X:= \
  17. $(GO_PKG)/core.build=OpenWrt \
  18. $(GO_PKG)/core.version=$(PKG_VERSION)
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
  21. define Package/xray-core
  22. TITLE:=A platform for building proxies to bypass network restrictions
  23. SECTION:=net
  24. CATEGORY:=Network
  25. URL:=https://xtls.github.io
  26. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  27. endef
  28. define Package/xray-core/description
  29. Xray, Penetrates Everything. It helps you to build your own computer network.
  30. It secures your network connections and thus protects your privacy.
  31. endef
  32. define Package/xray-core/install
  33. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  34. $(INSTALL_DIR) $(1)/usr/bin/
  35. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/xray
  36. endef
  37. $(eval $(call BuildPackage,xray-core))