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

pkgname=lightsoff
pkgver=3.34.0
pkgrel=1
pkgdesc="Turn off all the lights"
url="https://wiki.gnome.org/Apps/Lightsoff"
arch=(x86_64)
license=(GPL)
depends=(clutter-gtk librsvg)
makedepends=(gobject-introspection yelp-tools appstream-glib vala git meson)
groups=(gnome-extra)
_commit=146d937a11f7188d5fcb71fb8f50c871a5a7b359  # tags/3.34.0^0
source=("git+https://gitlab.gnome.org/GNOME/lightsoff.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

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

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