diff options
author | mzz2017 | 2020-12-19 22:53:37 +0800 |
---|---|---|
committer | mzz2017 | 2020-12-19 22:53:37 +0800 |
commit | 3100cb74cd766229e3330db4603a8d09af01d547 (patch) | |
tree | f0d97886a815d00fa8ec8290b79f332a9634cd9a | |
download | aur-3100cb74cd766229e3330db4603a8d09af01d547.tar.gz |
v1
-rw-r--r-- | .INSTALL | 44 | ||||
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 47 |
4 files changed, 118 insertions, 0 deletions
diff --git a/.INSTALL b/.INSTALL new file mode 100644 index 000000000000..d72871ce70cb --- /dev/null +++ b/.INSTALL @@ -0,0 +1,44 @@ +#!/bin/sh + +post_install() { + systemctl daemon-reload + systemctl enable v2raya + systemctl start v2raya + + ECHOLEN=$(echo -e|awk '{print length($0)}') + if [ ${ECHOLEN} = '0' ] + then + ECHO='echo -e' + else + ECHO='echo' + fi; + $ECHO "\033[36m******************************\033[0m" + $ECHO "\033[36m* Completed! *\033[0m" + $ECHO "\033[36m******************************\033[0m" +} + +post_upgrade() { + systemctl daemon-reload + systemctl restart v2raya + + ECHOLEN=$(echo -e|awk '{print length($0)}') + if [ ${ECHOLEN} = '0' ] + then + ECHO='echo -e' + else + ECHO='echo' + fi; + $ECHO "\033[36m******************************\033[0m" + $ECHO "\033[36m* Completed! *\033[0m" + $ECHO "\033[36m******************************\033[0m" +} + +pre_remove() { + systemctl disable v2raya + systemctl stop v2raya + systemctl stop v2ray +} + +post_remove() { + systemctl daemon-reload +} diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..81a5fcffecab --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = v2raya-git + pkgdesc = A web GUI client of Project V which supports VMess, VLESS, SS, SSR, Trojan and Pingtunnel protocols + pkgver = 20201217.r602.329a7e1 + pkgrel = 1 + url = https://github.com/v2rayA/v2rayA + arch = x86_64 + license = GPL3 + makedepends = go>=2:1.12.3-1 + makedepends = nodejs>=14 + makedepends = yarn + makedepends = python2 + depends = git + depends = glibc + depends = v2ray + provides = v2raya + conflicts = v2raya + conflicts = v2raya-bin + source = v2raya-git::git+https://github.com/v2rayA/v2rayA + sha512sums = SKIP + +pkgname = v2raya-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..bac1aadf9cde --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.vscode +.idea +pkg/ +src/ +v2raya-git* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7f01bf494d83 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: mzz2017 <mzz@tuta.io> + +pkgname=v2raya-git +pkgver=20201217.r602.329a7e1 +pkgrel=1 +pkgdesc="A web GUI client of Project V which supports VMess, VLESS, SS, SSR, Trojan and Pingtunnel protocols" +arch=('x86_64') +url="https://github.com/v2rayA/v2rayA" +license=('GPL3') +depends=('git' 'glibc' 'v2ray') +makedepends=('go>=2:1.12.3-1' 'nodejs>=14' 'yarn' 'python2') +provides=('v2raya') +conflicts=('v2raya' 'v2raya-bin') +source=("$pkgname::git+$url") +sha512sums=('SKIP') + +pkgver() { + cd "$srcdir"/"$pkgname" + local date=$(git log -1 --format="%cd" --date=short | sed s/-//g) + local count=$(git rev-list --count HEAD) + local commit=$(git rev-parse --short HEAD) + echo "$date.r${count}.$commit" +} + +build() { + cd "$srcdir/$pkgname/gui" + yarn config set registry https://registry.npm.taobao.org + yarn config set sass_binary_site https://cdn.npm.taobao.org/dist/node-sass -g + yarn --check-files + yarn build + + cd "$srcdir/$pkgname/service" + export GO111MODULE=on + export GOPROXY=https://goproxy.io + CGO_ENABLED=0 go build -ldflags '-X github.com/v2rayA/v2rayA/global.Version=unstable -s -w -extldflags "-static"' -o v2raya +} + +package() { + cd "${srcdir}"/"${pkgname}"/ + install -Dm 755 service/v2raya -t "${pkgdir}"/usr/bin/ + find web -type d -exec install -vd "${pkgdir}"/etc/v2raya/{} \; + find web -type f -exec install -vm 644 {} "${pkgdir}"/etc/v2raya/{} \; + install -dm 750 "${pkgdir}"/etc/v2raya/ + install -Dm 644 install/universal/v2raya.desktop -t "${pkgdir}"/usr/share/applications/ + install -Dm 644 install/universal/v2raya.service -t "${pkgdir}"/usr/lib/systemd/system/ + install -Dm 644 gui/public/img/icons/android-chrome-512x512.png "${pkgdir}"/usr/share/icons/hicolor/512x512/apps/v2raya.png +} |