# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>

pkgname=bolt
pkgver=0.9.7
pkgrel=2
pkgdesc="Thunderbolt 3 device manager"
arch=('x86_64' 'aarch64')
url="https://gitlab.freedesktop.org/bolt/bolt"
license=('LGPL-2.1-or-later')
depends=('polkit' 'systemd')
makedepends=('asciidoc' 'meson' 'python-setuptools' 'patch')
checkdepends=('umockdev')
source=(https://gitlab.freedesktop.org/$pkgname/$pkgname/-/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('593c7e7d0ecebd7b9e2c3efabe33f8fec5501ff02ffd6d8563cfc14a91c31c1c')

build() {
  cd $pkgname-$pkgver

  arch-meson ../build
  meson compile -v -C ../build
}

check() {
  cd $pkgname-$pkgver

  meson test -C ../build --print-errorlogs
}

package() {
  cd $pkgname-$pkgver

  meson install -C ../build --destdir "${pkgdir}"
}
