# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=gnome-online-accounts
pkgver=3.40.0
pkgrel=1
pkgdesc="Single sign-on framework for GNOME"
url="https://wiki.gnome.org/Projects/GnomeOnlineAccounts"
arch=(x86_64)
license=(LGPL)
depends=(webkit2gtk json-glib libnotify rest libsecret krb5 gcr)
makedepends=(gobject-introspection gtk-doc vala git meson)
optdepends=('gvfs-goa: Virtual file systems, e.g. OwnCloud'
            'gvfs-google: Google Drive')
provides=(libgoa-1.0.so libgoa-backend-1.0.so)
_commit=160035a1e15b514745eebcc6f44fd184be9ef0e4  # tags/3.40.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-online-accounts.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build \
    -D media_server=true \
    -D gtk_doc=true \
    -D man=true
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

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

# vim:set ts=2 sw=2 et:
