summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuckSoft2020-07-17 02:54:45 +0800
committerDuckSoft2020-07-17 02:54:45 +0800
commit2034327b8779524a314930455d4775745113fd0b (patch)
treebaf929d8cb648924e5f28e4f3c0c9d80470576de
downloadaur-2034327b8779524a314930455d4775745113fd0b.tar.gz
initial commit
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD44
2 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6bc140251c4a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = qv2ray-plugin-trojan-go-git
+ pkgdesc = Qv2ray Plugin: Trojan-Go (Stable Build)
+ pkgver = 20200715.r18.a86ffd6
+ pkgrel = 1
+ url = https://github.com/Qv2ray/QvPlugin-Trojan-Go
+ arch = x86_64
+ groups = qv2ray-plugin
+ license = GPL3
+ makedepends = git
+ makedepends = make
+ makedepends = qt5-tools
+ makedepends = which
+ makedepends = gcc
+ makedepends = cmake
+ makedepends = ninja
+ makedepends = libffi
+ depends = qt5-base
+ provides = qv2ray-plugin-trojan-go
+ conflicts = qv2ray-plugin-trojan-go
+ source = qv2ray-plugin-trojan-go::git+https://github.com/Qv2ray/QvPlugin-Trojan-Go#branch=master
+ sha512sums = SKIP
+
+pkgname = qv2ray-plugin-trojan-go-git
+ depends = qt5-base
+ depends = qv2ray
+ depends = trojan-go
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..56ce454ef610
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: DuckSoft <realducksoft at gmail dot com>
+pkgname=qv2ray-plugin-trojan-go-git
+_pkgname=qv2ray-plugin-trojan-go
+pkgver=20200715.r18.a86ffd6
+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_BUILD_TYPE=Release \
+ -GNinja
+ ninja
+}
+package() {
+ # NOTE: Working around extra-x86_64-build
+ depends+=('qv2ray' 'trojan-go')
+ cd "$srcdir"/"$_pkgname"/build
+ install -Dm644 libQvTrojanGoPlugin.so "$pkgdir"/usr/share/qv2ray/plugins/libQvGoTrojanPlugin.so
+ # NOTE: This virtual dependency will be introduced after Qv2ray stablize its interface.
+ # depends+=(${_virtualdepends[@]})
+}