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

pkgname=libnotify
pkgver=0.7.9
pkgrel=2
pkgdesc="Library for sending desktop notifications"
arch=(x86_64)
url="https://gitlab.gnome.org/GNOME/libnotify"
license=(LGPL)
depends=(gdk-pixbuf2)
makedepends=(gtk3 gobject-introspection git meson docbook-xsl xmlto gtk-doc)
_commit=98a4bf483a69c6436311bcb9834d9d93235c96b7  # tags/0.7.9^0
source=("git+$url.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() {
  depends+=(libg{lib,object,io}-2.0.so libgdk_pixbuf-2.0.so)
  provides+=(libnotify.so)

  meson install -C build --destdir "$pkgdir"
}
