# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=libxmlb
pkgver=%version%
pkgrel=%release%
pkgdesc="Library to help create and query binary XML blobs"
arch=(x86_64)
url="https://github.com/hughsie/libxmlb"
license=(LGPL)
depends=(glib2 libstemmer xz zstd)
makedepends=(meson gobject-introspection gtk-doc)
checkdepends=(shared-mime-info)
source=("https://github.com/hughsie/libxmlb/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc})
sha256sums=('8007d39eefaa047d23e323523ae3c4da5fca77543b0fc4e188f7a3cd28872ff4'
            'SKIP')
validpgpkeys=(163EB50119225DB3DF8F49EA17ACBA8DFA970E17) # Richard Hughes <richard@hughsie.com>

build() {
  arch-meson ${pkgname}-${pkgver} build -D stemmer=true
  ninja -v -C build
}

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

package() {
  meson install -C build --destdir "${pkgdir}"
  rm -r "${pkgdir}"/usr/{lib,share}/installed-tests/
}
