# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libgepub
pkgver=0.6.0
pkgrel=2
pkgdesc="Simple library to read epub files using glib"
url="https://gitlab.gnome.org/GNOME/libgepub"
arch=(x86_64)
license=(LGPL)
depends=(webkit2gtk libarchive)
makedepends=(git gtk-doc gobject-introspection meson)
_commit=ecca0e1e8f2c301b1ea769e618a92125ee934b57  # tags/0.6.0^0
source=("git+https://gitlab.gnome.org/GNOME/libgepub.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed '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
}
