# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-session
pkgver=40.1.1
pkgrel=1
pkgdesc="The GNOME Session Handler"
url="https://gitlab.gnome.org/GNOME/gnome-session"
arch=(x86_64)
license=(GPL)
depends=(systemd dconf gsettings-desktop-schemas gtk3 gnome-desktop
         json-glib libgl libsm libxtst)
makedepends=(mesa gtk-doc xtrans git python xmlto docbook-xsl meson)
groups=(gnome)
_commit=eace95defb1b285952452dfd2a790d39181d762e  # tags/40.1.1^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-session.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}
  
build() {
  arch-meson $pkgname build
  meson compile -C build
}

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

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