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

pkgname=gnome-mahjongg
pkgver=3.32.0
pkgrel=1
pkgdesc="Disassemble a pile of tiles by removing matching pairs"
url="https://wiki.gnome.org/Apps/Mahjongg"
arch=(x86_64)
license=(GPL)
depends=(gtk3 librsvg)
makedepends=(meson gobject-introspection yelp-tools appstream-glib git vala)
groups=(gnome-extra)
_commit=ab72d2b3f50f4d96e092c3afcb93c3e7d76bd3b5  # tags/3.32.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-mahjongg.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

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

check() {
  meson test -C build
}

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