# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=gnome-documents
pkgver=3.33.90+7+gcc19ed47
pkgrel=1
pkgdesc="A document manager application for GNOME"
url="https://wiki.gnome.org/Apps/Documents"
arch=(x86_64)
license=(GPL)
depends=(evince gjs gtk3 gnome-desktop gnome-online-accounts libgdata
         tracker-miners libzapojit webkit2gtk gnome-online-miners librsvg
         libgepub gnome-epub-thumbnailer)
makedepends=(gobject-introspection git meson yelp-tools inkscape)
optdepends=('libreoffice-fresh: Support for Libreoffice document types')
groups=(gnome)
_commit=cc19ed47cc81a59a379edefcc0e37c61803f51b4  # master
source=("git+https://gitlab.gnome.org/GNOME/gnome-documents.git#commit=$_commit"
        "git+https://gitlab.gnome.org/GNOME/libgd.git")
sha256sums=('SKIP'
            'SKIP')

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

prepare() {
  cd $pkgname

  git submodule init
  git config --local submodule.subprojects/libgd.url "$srcdir/libgd"
  git submodule update
}
  

build() {
  arch-meson $pkgname build -D getting_started=true
  ninja -C build
}

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

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

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