summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8e1da1aac8b553e116c8ae8255edbed5bca21e66 (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
pkgname=boringtun-git
pkgver=0.5.2.r18.ge1d6360
pkgrel=1
pkgdesc="Userspace WireGuard® Implementation in Rust"
arch=('x86_64' 'i686' 'aarch64')
url="https://github.com/cloudflare/boringtun"
license=('BSD-3-Clause')
depends=('gcc-libs')
makedepends=('cargo' 'git')
optdepends=('wireguard-tools: tools and scripts for interface setup')
provides=('boringtun')
conflicts=('boringtun')
source=($pkgname::git+https://github.com/cloudflare/boringtun.git)
sha256sums=('SKIP')

pkgver() {
	cd $pkgname
	git describe --long --tags --match 'boringtun-cli-*' | sed 's/^boringtun-cli-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd $pkgname
	cargo build --release
}

package() {
	cd $pkgname
	install -D -m755 "$srcdir/$pkgname/target/release/boringtun-cli" "$pkgdir/usr/bin/boringtun"
}