Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=Xray-core
  3. PKG_VERSION:=1.5.9
  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:=ef61f80a32229f583c375ec8da79a1533ba5efae0fcb011e68a0ad0c913f6a87
  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_LDFLAGS:=-s -w
  16. GO_PKG_BUILD_PKG:=$(GO_PKG)/main
  17. GO_PKG_LDFLAGS_X:= \
  18. $(GO_PKG)/core.build=OpenWrt \
  19. $(GO_PKG)/core.version=$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
  22. define Package/xray-core
  23. TITLE:=A platform for building proxies to bypass network restrictions
  24. SECTION:=net
  25. CATEGORY:=Network
  26. URL:=https://xtls.github.io
  27. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  28. endef
  29. define Package/xray-core/description
  30. Xray, Penetrates Everything. It helps you to build your own computer network.
  31. It secures your network connections and thus protects your privacy.
  32. endef
  33. define Package/xray-core/install
  34. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  35. $(INSTALL_DIR) $(1)/usr/bin/
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/xray
  37. endef
  38. $(eval $(call BuildPackage,xray-core))