# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-notes
pkgver=40.1
pkgrel=1
pkgdesc="Write out notes, every detail matters"
url="https://wiki.gnome.org/Apps/Notes"
arch=(x86_64)
license=(GPL)
depends=(tracker3 glib2 gnome-online-accounts gtk3 json-glib
         evolution-data-server libhandy libxml2 curl util-linux-libs webkit2gtk)
makedepends=(yelp-tools git meson)
provides=("bijiben=$pkgver")
conflicts=(bijiben)
replaces=(bijiben)
_commit=b5189e213b50cac50f5602945836dc4d85b17959  # tags/BIJIBEN_40_1^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-notes.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D update_mimedb=false
  meson compile -C build
}

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

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