# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=almanah
pkgver=0.11.0+219+g1790486
pkgrel=1
pkgdesc="Small GTK+ application to allow you to keep a diary of your life"
arch=('x86_64')
url="https://wiki.gnome.org/AlmanahDiary"
license=('GPL')
depends=('evolution' 'libcryptui' 'gtkspell3' 'gtksourceview3')
makedepends=('git' 'meson')
_commit=179048616b1c9a7a35308a3c118ca6b6c5d78d8d  # master
source=("git+https://gitlab.gnome.org/GNOME/almanah.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

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

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