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

pkgname=zenity
pkgver=4.0.1
pkgrel=1
pkgdesc="Display graphical dialog boxes from shell scripts"
url="https://gitlab.gnome.org/GNOME/zenity"
arch=(x86_64 aarch64)
license=(LGPL-2.1-or-later)
depends=(
  libadwaita
)
makedepends=(
  git
  help2man
  meson
  util-linux
  yelp-tools
)
_commit=34366d85f2d408e5f74cb688a392fd85cd22548c  # tags/4.0.1^0
source=("git+https://gitlab.gnome.org/GNOME/zenity.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd zenity
  git describe --tags | sed 's/-real//;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd zenity
}

build() {
  local meson_options=(
  )

  arch-meson zenity build "${meson_options[@]}"
  meson compile -C build
}

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

package() {
  meson install -C build --destdir "$pkgdir"
  hardlink -c "$pkgdir/usr/share/help"
}

# vim:set sw=2 sts=-1 et:
