new package: v2ray
This commit is contained in:
parent
0e8422d5a2
commit
b4b1b02383
19
packages/v2ray/build.sh
Normal file
19
packages/v2ray/build.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
TERMUX_PKG_HOMEPAGE=https://www.v2fly.org/
|
||||||
|
TERMUX_PKG_DESCRIPTION="A platform for building proxies to bypass network restrictions"
|
||||||
|
TERMUX_PKG_LICENSE="MIT"
|
||||||
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
|
TERMUX_PKG_VERSION=5.0.3
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/v2fly/v2ray-core.git
|
||||||
|
TERMUX_PKG_BUILD_IN_SRC=true
|
||||||
|
|
||||||
|
termux_step_make() {
|
||||||
|
termux_setup_golang
|
||||||
|
go mod init || :
|
||||||
|
go mod tidy
|
||||||
|
go build -o v2ray ./main
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_make_install() {
|
||||||
|
install -Dm700 -t $TERMUX_PREFIX/bin v2ray
|
||||||
|
install -Dm600 -t $TERMUX_PREFIX/share/v2ray release/config/*.json
|
||||||
|
}
|
15
packages/v2ray/common-platform-others.go.patch
Normal file
15
packages/v2ray/common-platform-others.go.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
--- a/common/platform/others.go
|
||||||
|
+++ b/common/platform/others.go
|
||||||
|
@@ -31,9 +31,9 @@
|
||||||
|
defPath := filepath.Join(assetPath, file)
|
||||||
|
for _, p := range []string{
|
||||||
|
defPath,
|
||||||
|
- filepath.Join("/usr/local/share/v2ray/", file),
|
||||||
|
- filepath.Join("/usr/share/v2ray/", file),
|
||||||
|
- filepath.Join("/opt/share/v2ray/", file),
|
||||||
|
+ filepath.Join("@TERMUX_PREFIX@/local/share/v2ray/", file),
|
||||||
|
+ filepath.Join("@TERMUX_PREFIX@/share/v2ray/", file),
|
||||||
|
+ filepath.Join("@TERMUX_PREFIX@/opt/v2ray/share/", file),
|
||||||
|
} {
|
||||||
|
if _, err := os.Stat(p); err != nil && errors.Is(err, fs.ErrNotExist) {
|
||||||
|
continue
|
Loading…
Reference in New Issue
Block a user