diff options
author | Markson | 2022-12-09 15:50:08 +0000 |
---|---|---|
committer | Markson | 2022-12-09 15:50:08 +0000 |
commit | 605b11a0845b8ac3d6bc718fad2a3ee6f4b41a27 (patch) | |
tree | ec17057576f02a30412bcdfe1a62da8f7996e8a2 /PKGBUILD | |
parent | cf9a7cc01fdb81e21076b05026d0141b0f282ded (diff) | |
download | aur-605b11a0845b8ac3d6bc718fad2a3ee6f4b41a27.tar.gz |
release 2.0.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -1,7 +1,7 @@ # Maintainer: mzz2017 <mzz@tuta.io> pkgname=v2raya -pkgver=1.5.9.1698.1 +pkgver=2.0.0 pkgrel=1 install=.INSTALL pkgdesc="A web GUI client of Project V which supports VMess, VLESS, SS, SSR, Trojan and Pingtunnel protocols" @@ -9,13 +9,15 @@ arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64') url="https://github.com/v2rayA/v2rayA" license=('AGPL3') depends=('glibc') -optdepends=('v2ray>=4.37.0-1' 'xray>=1.4.2-1') -makedepends=('go>=2:1.17.0-1' 'nodejs>=14' 'yarn' 'git') +makedepends=('git' 'go>=2:1.17.0-1' 'nodejs>=14' 'yarn') source=("$pkgname-$pkgver.tar.gz::https://github.com/v2rayA/v2rayA/archive/v$pkgver.tar.gz") sha512sums=('SKIP') +backup=("etc/default/v2raya") build() { cd "$srcdir/v2rayA-$pkgver/gui" + # https://github.com/webpack/webpack/issues/14532#issuecomment-947012063 + export NODE_OPTIONS=--openssl-legacy-provider yarn --check-files OUTPUT_DIR="$srcdir/v2rayA-$pkgver/service/server/router/web" yarn build @@ -23,9 +25,20 @@ build() { export GO111MODULE=on export GOPROXY=https://mirrors.aliyun.com/goproxy/,direct go build -ldflags '-X github.com/v2rayA/v2rayA/conf.Version='$pkgver' -s -w' -o v2raya + + # generate default config + cat > "$srcdir/v2rayA-$pkgver/v2raya.conf" << EOF +# v2raya config example +# Everything has defaults so you only need to uncomment things you want to +# change + +EOF + ./v2raya --report config | sed '1,6d' | fold -s -w 78 | sed -E 's/^([^#].+)/# \1/' >> "$srcdir/v2rayA-$pkgver/v2raya.conf" } package() { + depends+=('v2ray>=5.0.0') + cd "${srcdir}"/"v2rayA-${pkgver}"/ install -Dm 755 service/v2raya -t "${pkgdir}"/usr/bin/ install -dm 750 "${pkgdir}"/etc/v2raya/ @@ -33,4 +46,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 v2raya.conf "${pkgdir}"/etc/default/v2raya } |