Makefile 1.4 KB

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