blob: d8c81a57262e890aa427992316f09a557439be72 (
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: Dr-Incognito <v2ray.dev at gmail dot com>
pkgname=v2ray-desktop
pkgver=2.3.1
pkgrel=1
pkgdesc="A cross-platform GUI proxy client that supports Shadowsocks(R), V2Ray, and Trojan protocols (Stable Release)"
arch=("x86_64")
url="https://github.com/Dr-Incognito/V2Ray-Desktop"
license=("GPL3")
depends=("clash>=1.5.0" "qt5-base>=5.15.0" "qt5-quickcontrols>=5.15.0" "qt5-quickcontrols2>=5.15.0" "qt5-svg>=5.15.0")
makedepends=("git" "jq" "qt5-tools>=5.15.0" "qt5-declarative>=5.15.0")
provides=(v2ray-desktop)
source=("V2Ray-Desktop::git+${url}#tag=${pkgver}")
sha512sums=("SKIP")
prepare() {
cd "${srcdir}/V2Ray-Desktop"
echo "Detecting your country ... Please wait ..."
country=$(curl -s https://ipinfo.io/ | jq -r '.country')
echo "Your country: $country"
if [ "$country" = "CN" ]; then
echo "Use qzxing@gitee.com for Chinese users ..."
sed -i "s/github.com\/ftylitak/gitee.com\/Dr-Incognito/" .gitmodules
fi
echo "Initialize submodules. This may take a long time ..."
git submodule init
git submodule update --progress
}
build() {
cd "${srcdir}/V2Ray-Desktop"
sed -ie "s/V2RAY_USE_LOCAL_INSTALL[[:space:]]*= true/V2RAY_USE_LOCAL_INSTALL=false/" src/constants.h
sed -i "s/Exec=%1/Exec=\/opt\/v2ray-desktop\/v2ray-desktop/" src/misc/tpl-linux-autostart.desktop
sed -i "s/Icon=v2ray-desktop/Icon=\/opt\/v2ray-desktop\/v2ray-desktop.png/" src/misc/tpl-linux-autostart.desktop
lrelease src/locales/zh-CN.ts
mkdir -p build && cd build
qmake PREFIX=/usr ../src
make -j$nproc
}
package() {
cd "${srcdir}/V2Ray-Desktop"
install -Dm755 build/V2Ray-Desktop "${pkgdir}/opt/v2ray-desktop/v2ray-desktop"
install -Dm644 src/images/v2ray.png "${pkgdir}/opt/v2ray-desktop/v2ray-desktop.png"
install -Dm644 src/locales/zh-CN.qm "${pkgdir}/opt/v2ray-desktop/locales/zh-CN.qm"
install -Dm644 src/misc/tpl-linux-autostart.desktop "${pkgdir}/usr/share/applications/v2ray-desktop.desktop"
}
|