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

pkgname=quadrapassel
pkgver=40.2
pkgrel=1
pkgdesc="Fit falling blocks together (Tetris-like game for GNOME)"
url="https://wiki.gnome.org/Apps/Quadrapassel"
arch=(x86_64)
license=(GPL)
depends=(clutter-gtk gsound librsvg libmanette)
makedepends=(meson gobject-introspection yelp-tools appstream-glib git vala)
groups=(gnome-extra)
_commit=51adfcf8097fc17f7df44e228ac715272d07b60e  # tags/40.2^0
source=("git+https://gitlab.gnome.org/GNOME/quadrapassel.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

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

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

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