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

pkgname=gnome-weather
pkgver=40.1
pkgrel=1
pkgdesc="Access current weather conditions and forecasts"
url="https://wiki.gnome.org/Apps/Weather"
arch=(any)
license=(GPL)
depends=(gtk3 gjs libgweather geoclue2 gnome-desktop libhandy)
makedepends=(gobject-introspection appstream-glib git meson)
groups=(gnome)
_commit=41dd28a4a6b256c40dd294a9fae772792521de15  # tags/40.1^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-weather.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

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

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

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