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

pkgname=gnome-contacts
pkgver=40.0
pkgrel=1
pkgdesc="Contacts Manager for GNOME"
url="https://wiki.gnome.org/Apps/Contacts"
arch=(x86_64)
license=(GPL2)
depends=(gtk3 folks gnome-desktop dconf gnome-online-accounts libgee cheese
         libhandy)
makedepends=(vala gobject-introspection git meson appstream-glib)
groups=(gnome)
_commit=8c27ab8cb5e7fcdfe40a27e9744bd1299360a7c4  # tags/40.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-contacts.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() {
  DESTDIR="$pkgdir" meson install -C build
}
