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

pkgname=gnome-logs
pkgver=3.36.0
pkgrel=1
pkgdesc="A log viewer for the systemd journal"
url="https://wiki.gnome.org/Apps/Logs"
arch=(x86_64)
license=(GPL)
depends=(systemd gtk3 gsettings-desktop-schemas)
makedepends=(appstream-glib git meson yelp-tools)
groups=(gnome)
_commit=ca47dbc5ec7a38a154fdad85e92e1c823bb0b9bd  # tags/gnome-logs-3.36.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-logs.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D man=true
  meson compile -C build
}

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

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