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

pkgname=devhelp
pkgver=3.34.0
pkgrel=1
pkgdesc="API documentation browser for GNOME"
arch=(x86_64)
license=(GPL)
url="https://wiki.gnome.org/Apps/Devhelp"
depends=(webkit2gtk amtk)
makedepends=(gtk-doc git appstream-glib gobject-introspection meson yelp-tools)
groups=(gnome-extra)
_commit=aedf9f41d7b1f273488bf69da2e773fdbff1e699  # tags/3.34.0^0
source=("git+https://gitlab.gnome.org/GNOME/devhelp.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

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

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

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