# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-nibbles
pkgver=3.38.2
pkgrel=1
pkgdesc="Guide a worm around a maze"
url="https://wiki.gnome.org/Apps/Nibbles"
arch=(x86_64)
license=(GPL)
depends=(clutter-gtk gsound librsvg libgnome-games-support libgee)
makedepends=(gobject-introspection yelp-tools appstream-glib vala git meson)
groups=(gnome-extra)
_commit=ca7d44e7a54a018b95d8eec843a701f1739be21f  # tags/3.38.2^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-nibbles.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed '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
}
