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

pkgname=libgweather
pkgver=3.33.92+11+g13ce5dd
pkgrel=1
pkgdesc="Location and timezone database and weather-lookup library"
url="https://wiki.gnome.org/Projects/LibGWeather"
arch=(x86_64)
license=(LGPL)
depends=(libsoup gtk3 geocode-glib dconf)
makedepends=(gobject-introspection vala git gtk-doc glade meson)
_commit=13ce5dd6bc84daa6d84331b0ce631bd9abdbdd9c  # master
source=("git+https://gitlab.gnome.org/GNOME/libgweather.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D gtk_doc=true
  ninja -C build
}

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

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