# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Stefano Facchini <stefano.facchini@gmail.com>

pkgname=libosinfo
pkgver=1.9.0
pkgrel=1
pkgdesc="GObject based library API for managing information about operating systems, hypervisors and the (virtual) hardware devices they can support"
arch=(x86_64)
url="https://libosinfo.org/"
license=(GPL LGPL)
depends=(glib2 hwids libsoup libxslt osinfo-db)
makedepends=(check gobject-introspection gtk-doc meson vala)
source=(https://releases.pagure.org/libosinfo/$pkgname-$pkgver.tar.xz{,.asc})
validpgpkeys=('DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF'  # Daniel P. Berrange
              '09B9C8FF223EF113AFA06A39EE926C2BDACC177B') # Fabiano Fidêncio <fidencio@redhat.com>
sha256sums=('b4f3418154ef3f43d9420827294916aea1827021afc06e1644fc56951830a359'
            'SKIP')

build() {
  arch-meson $pkgname-$pkgver build \
    -D with-usb-ids-path=/usr/share/hwdata/usb.ids \
    -D with-pci-ids-path=/usr/share/hwdata/pci.ids
  ninja -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}

