# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Thijs Vermeir <thijsvermeir@gmail.com>
# Contributor: Denis Zawada <deno@rootnode.net>

pkgname=gupnp-av
pkgver=0.12.11+2+gb5ca07c
pkgrel=1
pkgdesc="Library to ease handling and implementation of UPnP A/V profiles"
url="https://wiki.gnome.org/Projects/GUPnP"
arch=(x86_64)
license=(LGPL)
depends=(glib2 libxml2)
makedepends=(gobject-introspection gtk-doc vala meson git)
_commit=b5ca07c0117dfb4a9aaf470649294251f3f6ace1  # master
source=("git+https://gitlab.gnome.org/GNOME/gupnp-av.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

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

check() {
  meson test -C build
}

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