# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=libgnome-games-support
pkgver=1.8.1
pkgrel=1
pkgdesc="Code shared between GNOME games"
url="https://gitlab.gnome.org/GNOME/libgnome-games-support"
arch=(x86_64)
license=(GPL3 LGPL3)
depends=(libgee gtk3)
makedepends=(vala git meson)
provides=("libgnome-games-support-${pkgver%%.*}.so")
_commit=5e8a486f131e6eb46a77f7ee6f57db0df7591a90  # tags/1.8.1^0
source=("git+https://gitlab.gnome.org/GNOME/libgnome-games-support.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

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

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