# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Marcin (CTRL) Wieczorek <marcin@marcin.co>
# Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to>

pkgname=umockdev
pkgver=0.18.3
pkgrel=1
pkgdesc="Record/mock hardware devices for bug reports and regression tests"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://github.com/martinpitt/umockdev/"
license=('LGPL')
depends=('systemd' 'libgudev' 'libpcap')
makedepends=('meson' 'gobject-introspection' 'gtk-doc' 'vala')
source=(https://github.com/martinpitt/umockdev/releases/download/$pkgver/$pkgname-$pkgver.tar.xz)
sha256sums=('aba95c323037c842f1617931260231b8557d119aa2891cbca8b811fcc559294a')

build() {
  cd $pkgname-$pkgver

  arch-meson -Dgtk_doc=true ../build
  ninja -v -C ../build
}

check() {
  cd $pkgname-$pkgver

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

package() {
  cd $pkgname-$pkgver

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