# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
 
pkgname=libportal
pkgver=0.4
pkgrel=1
pkgdesc="GIO-style async APIs for most Flatpak portals"
url="https://github.com/flatpak/libportal"
arch=(x86_64)
license=(LGPL)
depends=(glib2)
makedepends=(git meson gtk-doc)
_commit=f68764e288ede516d902b131cc4fadded3804059  # tags/0.4^0
source=("git+https://github.com/flatpak/libportal#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed -r 's/[^-]+-g[^-]+$/r&/;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"
}

# vim:set sw=2 et:
