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

pkgname=totem-plparser
pkgver=3.26.3
pkgrel=1
pkgdesc="Simple GObject-based library to parse and save a host of playlist formats"
url="https://gitlab.gnome.org/GNOME/totem-pl-parser"
license=(LGPL)
arch=(x86_64)
depends=(libarchive libquvi libxml2)
makedepends=(gobject-introspection git gtk-doc meson)
checkdepends=(gvfs)
_commit=9cb2d6e2c8eaf17d77e19493c6f1fac34893232b  # tags/V_3_26_3^0
source=("git+https://gitlab.gnome.org/GNOME/totem-pl-parser.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd totem-pl-parser
  git describe --tags | sed 's/^V_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd totem-pl-parser
}

build() {
  arch-meson totem-pl-parser build -D enable-gtk-doc=true
  ninja -C build
}

check() {
  meson test -C build
}

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