# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=template-glib
pkgver=3.34.0
pkgrel=1
pkgdesc="A templating library for GLib"
url="https://gitlab.gnome.org/GNOME/template-glib"
arch=(x86_64)
license=(LGPL)
depends=(glib2 gobject-introspection-runtime)
makedepends=(git meson vala gobject-introspection gtk-doc)
_commit=3899ca522bc2cc6e2d866abbc9bc05818a6c48b3  # tags/3.34.0^0
source=("git+https://gitlab.gnome.org/GNOME/template-glib.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D enable_gtk_doc=true
  ninja -C build
}

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

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