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

pkgname=polari
pkgver=40.1
pkgrel=1
pkgdesc="An IRC Client for GNOME"
url="https://wiki.gnome.org/Apps/Polari"
arch=(x86_64)
license=(GPL)
depends=(gjs gtk3 telepathy-glib telepathy-idle telepathy-mission-control telepathy-logger gspell)
makedepends=(gobject-introspection yelp-tools appstream-glib git meson)
groups=(gnome-extra)
_commit=0e353120d810c78e690fcae4c52cffd31fa2572a  # tags/40.1^0
source=("git+https://gitlab.gnome.org/GNOME/polari.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"
}
