You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.6 KiB
Makefile
55 lines
1.6 KiB
Makefile
# SPDX-License-Identifier: GPL-3.0-only
|
|
#
|
|
# Copyright (C) 2021 ImmortalWrt.org
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=xray-core
|
|
PKG_VERSION:=1.8.4
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
|
|
PKG_HASH:=89f73107abba9bd438111edfe921603ddb3c2b631b2716fbdc6be78552f0d322
|
|
|
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|
PKG_LICENSE:=MPL-2.0
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/Xray-core-$(PKG_VERSION)
|
|
PKG_BUILD_DEPENDS:=golang/host
|
|
PKG_BUILD_PARALLEL:=1
|
|
PKG_USE_MIPS16:=0
|
|
|
|
GO_PKG:=github.com/xtls/xray-core
|
|
GO_PKG_BUILD_PKG:=github.com/xtls/xray-core/main
|
|
GO_PKG_LDFLAGS_X:= \
|
|
$(GO_PKG)/core.build=OpenWrt \
|
|
$(GO_PKG)/core.version=$(PKG_VERSION)
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|
|
|
GO_PKG_TARGET_VARS:=$(filter-out CGO_ENABLED=%,$(GO_PKG_TARGET_VARS)) CGO_ENABLED=0
|
|
|
|
define Package/xray-core
|
|
TITLE:=A platform for building proxies to bypass network restrictions
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
URL:=https://xtls.github.io
|
|
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
|
endef
|
|
|
|
define Package/xray-core/description
|
|
Xray, Penetrates Everything. It helps you to build your own computer network.
|
|
It secures your network connections and thus protects your privacy.
|
|
endef
|
|
|
|
define Package/xray-core/install
|
|
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
|
$(INSTALL_DIR) $(1)/usr/bin/
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/xray
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,xray-core))
|