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

pkgname=atk
pkgver=2.36.0
pkgrel=1
pkgdesc="Interface definitions of accessibility infrastructure"
url="https://gitlab.gnome.org/GNOME/atk"
arch=(x86_64)
license=(LGPL)
depends=(glib2)
makedepends=(gobject-introspection git gtk-doc meson)
provides=(libatk-1.0.so)
_commit=dbe95f6170ae1f4bb76c755506b4e3dd3990d5aa  # tags/ATK_2_36_0^0
source=("git+https://gitlab.gnome.org/GNOME/atk.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

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

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

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