# Maintainer: Andreas Grapentin <andreas@grapentin.org>
# Maintainer (Arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: André Silva <emulatorman@hyperbola.info>

pkgname=gnome-weather

pkgver=3.26.0
pkgrel=1.nonprism1
arch=(any)

pkgdesc="Access current weather conditions and forecasts, without geoclue2 support"
url="https://wiki.gnome.org/Apps/Weather"
license=(GPL)

makedepends=(intltool gobject-introspection autoconf-archive appstream-glib git)
depends=(gtk3 gjs libgweather gnome-desktop)
groups=(gnome-extra)

_commit=608877f993ab001666d9ca843c23c98c16459abe  # tags/3.26.0^0
source=("git+https://git.gnome.org/browse/gnome-weather#commit=$_commit"
        "nonprism.patch")
sha256sums=('SKIP'
            '982ac0d22e5e46adc97d5b9b964a13c3c036f9525b42b05fc56946a1d114f0de')

pkgver() {
  cd $pkgname

  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname

  patch -p1 -i $srcdir/nonprism.patch
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install
}
