summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6d73261edb9ebbd31321dceceab0ab815f462f47 (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
# Maintainer: Ariel AxionL <axionl@aosc.io>
# Contributor: GreaterFire <GreaterFire@protonmail.com>
pkgname=trojan-git
pkgver=r450.3d608e8
pkgrel=1
pkgdesc="An unidentifiable mechanism that helps you bypass GFW"
arch=('x86_64')
url="https://github.com/trojan-gfw/trojan"
license=('GPL3')
depends=('boost-libs' 'openssl' 'mariadb-libs')
optdepends=('ca-certificates: server certificate verification'
            'mariadb: advanced user management')
makedepends=('git' 'cmake' 'boost' 'openssl' 'mariadb-libs')
checkdepends=('openssl' 'python' 'curl' 'netcat')
conflicts=('trojan')
provides=('trojan')
source=("$pkgname::git+$url")
backup=('etc/trojan/config.json')
sha512sums=('SKIP')

pkgver() {
    cd "$srcdir/$pkgname"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd $pkgname
    cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
    make
}

check() {
    cd $pkgname
    ctest
}

package() {
    cd $pkgname
    make DESTDIR=$pkgdir install
}
# vim set: ts=4 sw=4 et