# 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.17.13
pkgrel=1
pkgdesc="Record/mock hardware devices for bug reports and regression tests"
arch=('x86_64')
url="https://github.com/martinpitt/umockdev/"
license=('LGPL')
depends=('systemd' 'libgudev')
makedepends=('meson' 'gobject-introspection' 'gtk-doc' 'vala')
source=($pkgname-$pkgver.tar.gz::https://github.com/martinpitt/$pkgname/archive/$pkgver.tar.gz)
sha256sums=('d34227cc48be96da220f8ebeb1d2ae6ab88c751ae0db07c6ea875e37740acfe9')

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
}
