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

pkgname=libosinfo
pkgver=1.6.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' 'libsoup' 'libxslt' 'osinfo-db')
makedepends=('check' 'gobject-introspection' 'vala' 'gtk-doc')
source=(https://releases.pagure.org/libosinfo/$pkgname-$pkgver.tar.gz{,.asc})
validpgpkeys=('DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF'  # Daniel P. Berrange
              '09B9C8FF223EF113AFA06A39EE926C2BDACC177B') # Fabiano Fidêncio <fidencio@redhat.com>
sha256sums=('3c385c1cceb46301fdc79115e7b28e3df7aa26fafce0a787a60132a86a1990c7'
            'SKIP')

prepare() {
  cd $pkgname-$pkgver
  sed -i '/export LC_ALL = C/d' maint.mk
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
              --with-usb-ids-path=/usr/share/hwdata/usb.ids \
              --with-pci-ids-path=/usr/share/hwdata/pci.ids \
              --enable-gtk-doc
  make
}

check() {
  cd $pkgname-$pkgver
  make check || :
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
