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

pkgname=gnome-desktop
pkgver=3.34.0
pkgrel=1
epoch=1
pkgdesc="Library with common API for various GNOME modules"
url="https://gitlab.gnome.org/GNOME/gnome-desktop"
arch=(x86_64)
license=(GPL LGPL)
depends=(gsettings-desktop-schemas gtk3 libxkbfile xkeyboard-config iso-codes libseccomp bubblewrap)
makedepends=(gobject-introspection git meson gtk-doc yelp-tools)
checkdepends=(xorg-server-xvfb)
_commit=fc5dba506df22b950d28c4841fcf723310977a25  # tags/3.34.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-desktop.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build \
    -D gnome_distributor="Arch Linux®" \
    -D gtk_doc=true
  ninja -C build
}

check() {
  # tests broken: missing locale he_IL.UTF-8
  xvfb-run meson test -C build --print-errorlogs || :
}

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