blob: 7ba2c133c4ea912b8828f2ea656186f63992d6c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Maintainer: mzz2017 <mzz@tuta.io>
pkgname=v2raya-git
pkgver=20210807.r793.3414a0c
pkgrel=1
install=.INSTALL
pkgdesc="v2rayA nightly version"
arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
url="https://github.com/v2rayA/v2rayA"
license=('GPL3')
depends=('git' 'glibc')
optdepends=('v2ray>=4.37.0-1' 'xray>=1.4.2-1')
makedepends=('go>=2:1.16.0-1' 'nodejs>=14' 'yarn' 'python2')
provides=('v2raya')
conflicts=('v2raya')
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
mv "$srcdir/v2raya-git/web" "$srcdir/v2raya-git/service/server/router/"
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/
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
}
|