mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-06 18:27:06 +08:00
v2ray: custom build v2ray
This commit is contained in:
parent
85a976ec0d
commit
5795104634
@ -8,25 +8,25 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=v2ray
|
PKG_NAME:=v2ray
|
||||||
PKG_VERSION:=4.5.0
|
PKG_VERSION:=4.5.0
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
PKG_ARCH_V2RAY:=linux-64
|
PKG_ARCH_V2RAY:=amd64
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),mipsel)
|
ifeq ($(ARCH),mipsel)
|
||||||
PKG_ARCH_V2RAY:=linux-mipsle
|
PKG_ARCH_V2RAY:=mipsle
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),mips)
|
ifeq ($(ARCH),mips)
|
||||||
PKG_ARCH_V2RAY:=linux-mips
|
PKG_ARCH_V2RAY:=mips
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),i386)
|
ifeq ($(ARCH),i386)
|
||||||
PKG_ARCH_V2RAY:=linux-32
|
PKG_ARCH_V2RAY:=386
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
PKG_ARCH_V2RAY:=linux-arm
|
PKG_ARCH_V2RAY:=arm
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),aarch64)
|
ifeq ($(ARCH),aarch64)
|
||||||
PKG_ARCH_V2RAY:=linux-arm64
|
PKG_ARCH_V2RAY:=arm64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
@ -39,49 +39,11 @@ define Package/$(PKG_NAME)
|
|||||||
URL:=https://github.com/v2ray/v2ray-core
|
URL:=https://github.com/v2ray/v2ray-core
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/config
|
|
||||||
menu "V2Ray Configuration"
|
|
||||||
depends on PACKAGE_v2ray
|
|
||||||
|
|
||||||
config PACKAGE_V2RAY_INCLUDE_V2RAY
|
|
||||||
bool "Include v2ray"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config PACKAGE_V2RAY_SOFTFLOAT
|
|
||||||
bool "Use soft-float binaries (mips/mipsle only)"
|
|
||||||
depends on PACKAGE_V2RAY_INCLUDE_V2RAY
|
|
||||||
default n
|
|
||||||
|
|
||||||
config PACKAGE_V2RAY_INCLUDE_V2CTL
|
|
||||||
bool "Include v2ctl"
|
|
||||||
depends on PACKAGE_V2RAY_INCLUDE_V2RAY
|
|
||||||
default y
|
|
||||||
|
|
||||||
config PACKAGE_V2RAY_INCLUDE_GEOIP
|
|
||||||
bool "Include geoip.dat"
|
|
||||||
depends on PACKAGE_V2RAY_INCLUDE_V2CTL
|
|
||||||
default n
|
|
||||||
|
|
||||||
config PACKAGE_V2RAY_INCLUDE_GEOSITE
|
|
||||||
bool "Include geosite.dat"
|
|
||||||
depends on PACKAGE_V2RAY_INCLUDE_V2CTL
|
|
||||||
default n
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/description
|
define Package/$(PKG_NAME)/description
|
||||||
V2Ray is a cross-platform proxy software
|
V2Ray is a cross-platform proxy software
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
|
|
||||||
wget https://github.com/v2ray/v2ray-core/releases/download/v$(PKG_VERSION)/v2ray-$(PKG_ARCH_V2RAY).zip -O $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY).zip
|
|
||||||
unzip -o $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY).zip -d $(PKG_BUILD_DIR)
|
|
||||||
ifdef CONFIG_PACKAGE_V2RAY_SOFTFLOAT
|
|
||||||
[ -f $(PKG_BUILD_DIR)/v2ray_softfloat ] && mv $(PKG_BUILD_DIR)/v2ray_softfloat $(PKG_BUILD_DIR)/v2ray || echo "Can't find soft-float binary."
|
|
||||||
[ -f $(PKG_BUILD_DIR)/v2ctl_softfloat ] && mv $(PKG_BUILD_DIR)/v2ctl_softfloat $(PKG_BUILD_DIR)/v2ctl || echo "Can't find soft-float binary."
|
|
||||||
endif
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
@ -92,18 +54,7 @@ endef
|
|||||||
|
|
||||||
define Package/$(PKG_NAME)/install
|
define Package/$(PKG_NAME)/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin/v2ray
|
$(INSTALL_DIR) $(1)/usr/bin/v2ray
|
||||||
ifdef CONFIG_PACKAGE_V2RAY_INCLUDE_V2RAY
|
$(INSTALL_BIN) ./files/$(ARCH)/v2ray $(1)/usr/bin/v2ray/
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v2ray $(1)/usr/bin/v2ray/
|
|
||||||
endif
|
|
||||||
ifdef CONFIG_PACKAGE_V2RAY_INCLUDE_V2CTL
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v2ctl $(1)/usr/bin/v2ray/
|
|
||||||
endif
|
|
||||||
ifdef CONFIG_PACKAGE_V2RAY_INCLUDE_GEOIP
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/geoip.dat $(1)/usr/bin/v2ray/
|
|
||||||
endif
|
|
||||||
ifdef CONFIG_PACKAGE_V2RAY_INCLUDE_GEOSITE
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/geosite.dat $(1)/usr/bin/v2ray/
|
|
||||||
endif
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|
BIN
package/lean/v2ray/files/386/v2ray
Executable file
BIN
package/lean/v2ray/files/386/v2ray
Executable file
Binary file not shown.
BIN
package/lean/v2ray/files/amd64/v2ray
Executable file
BIN
package/lean/v2ray/files/amd64/v2ray
Executable file
Binary file not shown.
BIN
package/lean/v2ray/files/arm/v2ray
Executable file
BIN
package/lean/v2ray/files/arm/v2ray
Executable file
Binary file not shown.
BIN
package/lean/v2ray/files/arm64/v2ray
Executable file
BIN
package/lean/v2ray/files/arm64/v2ray
Executable file
Binary file not shown.
BIN
package/lean/v2ray/files/mips/v2ray
Executable file
BIN
package/lean/v2ray/files/mips/v2ray
Executable file
Binary file not shown.
BIN
package/lean/v2ray/files/mipsle/v2ray
Executable file
BIN
package/lean/v2ray/files/mipsle/v2ray
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user