summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authormzz2022-11-06 23:05:41 +0800
committermzz2022-11-06 23:05:41 +0800
commit15d33ec96677eb506004259e835081b917f10b23 (patch)
treeb78dacf0e136f07e1b821485934e2021758ef754 /PKGBUILD
parent4690a76944ea9108f2f4e59ec92c1b7363e4b522 (diff)
downloadaur-15d33ec96677eb506004259e835081b917f10b23.tar.gz
add /etc/default/v2raya.conf
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD18
1 files changed, 16 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9ef00696f854..1c7168b5272b 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
}