blob: 7508412fa4306a20b01048a28c8026d21df1007f (
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
|
# Maintainer: DuckSoft <realducksoft at gmail dot com>
pkgname=qv2ray-plugin-trojan-go-git
_pkgname=qv2ray-plugin-trojan-go
pkgver=20201115.r28.7a0c3c9
pkgrel=1
pkgdesc="Qv2ray Plugin: Trojan-Go (Stable Build)"
arch=('x86_64')
url='https://github.com/Qv2ray/QvPlugin-Trojan-Go'
license=('GPL3')
# _virtualdepends=('qv2ray-plugin-host=2')
depends=('qt5-base')
makedepends=('git' 'make' 'qt5-tools' 'which' 'gcc' 'cmake' 'ninja' 'libffi')
provides=('qv2ray-plugin-trojan-go')
conflicts=('qv2ray-plugin-trojan-go')
groups=('qv2ray-plugin')
source=("$_pkgname::git+${url}#branch=master")
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"
}
prepare() {
cd "$srcdir"/"$_pkgname"
git submodule update --init --recursive
}
build() {
cd "$srcdir"/"$_pkgname"
mkdir -p build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX="${pkgdir}"/usr \
-DCMAKE_BUILD_TYPE=Release \
-GNinja
cmake --build .
}
package() {
# NOTE: Working around extra-x86_64-build
depends+=('qv2ray' 'trojan-go')
cd "$srcdir"/"$_pkgname"/build
cmake --install .
# NOTE: This virtual dependency will be introduced after Qv2ray stablize its interface.
# depends+=(${_virtualdepends[@]})
}
|