summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD18
2 files changed, 19 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9fde7d0f67f..9add10e99b6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = v2raya-git
pkgdesc = v2rayA nightly version
- pkgver = 20220920.r1217.f1b93b2
+ pkgver = 20221106.r1233.866642b
pkgrel = 1
url = https://github.com/v2rayA/v2rayA
install = .INSTALL
@@ -12,11 +12,12 @@ pkgbase = v2raya-git
license = GPL3
makedepends = git
makedepends = go>=2:1.17.0-1
- makedepends = nodejs>=14
+ makedepends = nodejs>=17
makedepends = yarn
depends = glibc
provides = v2raya
conflicts = v2raya
+ backup = etc/default/v2raya
source = v2raya-git::git+https://github.com/v2rayA/v2rayA#branch=feat_v5
sha512sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 9ef00696f85..1c7168b5272 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: mzz2017 <mzz@tuta.io>
pkgname=v2raya-git
-pkgver=20220920.r1217.f1b93b2
+pkgver=20221106.r1233.866642b
pkgrel=1
install=.INSTALL
pkgdesc="v2rayA nightly version"
@@ -9,12 +9,14 @@ arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
url="https://github.com/v2rayA/v2rayA"
license=('GPL3')
depends=('glibc')
-makedepends=('git' 'go>=2:1.17.0-1' 'nodejs>=14' 'yarn')
+makedepends=('git' 'go>=2:1.17.0-1' 'nodejs>=17' 'yarn')
provides=('v2raya')
conflicts=('v2raya')
+backup=("etc/default/v2raya")
source=("$pkgname::git+$url#branch=feat_v5")
sha512sums=('SKIP')
+
pkgver() {
cd "$srcdir"/"$pkgname"
local date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
@@ -25,6 +27,8 @@ pkgver() {
build() {
cd "$srcdir/$pkgname/gui"
+ # https://github.com/webpack/webpack/issues/14532#issuecomment-947012063
+ export NODE_OPTIONS=--openssl-legacy-provider
yarn --check-files
export OUTPUT_DIR="$srcdir/$pkgname/service/server/router/web"
yarn build
@@ -33,6 +37,15 @@ build() {
export GO111MODULE=on
export GOPROXY=https://goproxy.cn,direct
go build -ldflags '-X github.com/v2rayA/v2rayA/conf.Version=unstable-'"$(pkgver)"' -s -w' -o v2raya
+
+ # generate default config
+ cat > "$srcdir/v2raya.conf" << EOF
+# v2raya config example
+# Everything has defaults so you only need to uncomment things you want to
+# change
+EOF
+ set -o pipefail
+ ./v2raya --report config | sed '1,6d' | fold -s -w 78 | sed -E 's/^([^#].+)/# \1/' >> "$srcdir/v2raya.conf"
}
package() {
@@ -45,4 +58,5 @@ package() {
install -Dm 644 install/universal/v2raya.service -t "${pkgdir}"/usr/lib/systemd/system/
install -Dm 644 install/universal/v2raya-lite.service -t "${pkgdir}"/usr/lib/systemd/user/
install -Dm 644 gui/public/img/icons/android-chrome-512x512.png "${pkgdir}"/usr/share/icons/hicolor/512x512/apps/v2raya.png
+ install -Dm 644 "${srcdir}"/v2raya.conf "${pkgdir}"/etc/default/v2raya
}