From 52e089dd7adb4680ff6a7772097b7d13166e7319 Mon Sep 17 00:00:00 2001 From: ipkalm Date: Sun, 9 May 2021 19:06:35 +0700 Subject: [PATCH 1/2] New package: v2ray-4.38.3 --- srcpkgs/v2ray/files/v2ray/run | 3 +++ srcpkgs/v2ray/template | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 srcpkgs/v2ray/files/v2ray/run create mode 100644 srcpkgs/v2ray/template diff --git a/srcpkgs/v2ray/files/v2ray/run b/srcpkgs/v2ray/files/v2ray/run new file mode 100644 index 000000000000..4622d509d5a7 --- /dev/null +++ b/srcpkgs/v2ray/files/v2ray/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec chpst -u nobody:nogroup v2ray -config=/etc/v2ray/config.json 2>&1 diff --git a/srcpkgs/v2ray/template b/srcpkgs/v2ray/template new file mode 100644 index 000000000000..2688b22a952c --- /dev/null +++ b/srcpkgs/v2ray/template @@ -0,0 +1,36 @@ +# Template file for 'v2ray' +pkgname=v2ray +version=4.38.3 +revision=1 +wrksrc=${pkgname}-core-${version} +build_style=go +go_import_path="github.com/v2fly/v2ray-core/v4" +short_desc="Platform for building proxies to bypass network restrictions" +maintainer="ipkalm " +license="MIT" +homepage="https://github.com/v2fly/v2ray-core" +distfiles="https://github.com/v2fly/v2ray-core/archive/v${version}/${pkgname}-${version}.tar.gz" +checksum=b06d2bf63fd08d8a92d51824f69e41345bd90d747d444ca37770b2017a2a5a00 +conf_files="/etc/v2ray/config.json" + +do_build() { + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external" + go build -o v2ray ./main + go build -o v2ctl ./infra/control/main +} + +do_check() { + go test -p 1 -tags json -v -timeout 30m ./... +} + +pre_install() { + vmkdir etc/v2ray + vcopy release/config/*.json etc/v2ray/ +} + +do_install() { + vlicense LICENSE + vbin v2ray + vbin v2ctl + vsv v2ray +} From 1ae6f0dd926b239c570d76aa03dbe4dcdc94ef49 Mon Sep 17 00:00:00 2001 From: ipkalm Date: Mon, 10 May 2021 11:23:14 +0700 Subject: [PATCH 2/2] Update srcpkgs/v2ray/template Co-authored-by: noarchwastaken --- srcpkgs/v2ray/template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/srcpkgs/v2ray/template b/srcpkgs/v2ray/template index 2688b22a952c..aa8f55e6091b 100644 --- a/srcpkgs/v2ray/template +++ b/srcpkgs/v2ray/template @@ -13,6 +13,8 @@ distfiles="https://github.com/v2fly/v2ray-core/archive/v${version}/${pkgname}-${ checksum=b06d2bf63fd08d8a92d51824f69e41345bd90d747d444ca37770b2017a2a5a00 conf_files="/etc/v2ray/config.json" +system_accounts="v2ray" + do_build() { export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external" go build -o v2ray ./main