archrelease: copy trunk to community-any
[ArchLinux/community.git] / fastd / repos / community-x86_64 / PKGBUILD
blob5fad5a465c9c52ab8bd15132a26a5d0e2977ad7e
1 # Maintainer: Konstantin Gizdov <arch at kge dot pw>
2 # Contributor: Baptiste Jonglez <archlinux at bitsofnetworks dot org>
3 # Contributor: NeoRaider
5 pkgname=fastd
6 pkgver=22
7 pkgrel=3
8 arch=('x86_64')
9 pkgdesc="Fast and secure tunneling daemon"
10 makedepends=('meson')
11 checkdepends=('cmocka')
12 depends=('gcc-libs' 'libcap' 'libmnl' 'libuecc>=6' 'libsodium' 'json-c' 'openssl')
13 url="https://github.com/NeoRaider/fastd"
14 license=('BSD')
15 source=("https://github.com/NeoRaider/fastd/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
16 sha512sums=('66196fa13c93b87b78b9e31bc267cf616dcfb4a964387c4a3f0f3176fa1529be335a6fac91379038d6a8b1a1be4fea547659551a8a9fa8d6939589d5f8a9a7aa')
18 build() {
19   cd "$srcdir/fastd-${pkgver}"
20   meson setup               \
21     --prefix=/usr           \
22     -Dbuildtype=release     \
23     -Db_lto=true            \
24     -Dsystemd=enabled       \
25     -Dbuild_tests=true      \
26     . "$srcdir/build-${pkgver}"
28   cd "$srcdir/build-${pkgver}"
29   ninja
32 check() {
33   cd "$srcdir/build-${pkgver}"
34   ninja test
37 package() {
38   cd "$srcdir/build-${pkgver}"
39   DESTDIR="$pkgdir" ninja install
40   
41   install -dm755 "${pkgdir}/etc/fastd/"
42   
43   install -Dm644 "$srcdir/${pkgname}-${pkgver}/COPYRIGHT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
44   install -Dm644 "$srcdir/${pkgname}-${pkgver}/doc/examples/fastd@.service" "${pkgdir}/usr/lib/systemd/system/fastd@.service"
45   install -Dm644 "$srcdir/${pkgname}-${pkgver}/doc/fastd.1" "${pkgdir}/usr/share/man/man1/fastd.1"