# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=libgepub
pkgver=0.7.1
pkgrel=2
pkgdesc="Simple library to read epub files using glib"
url="https://gitlab.gnome.org/GNOME/libgepub"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=(LGPL)
depends=(
  glib2
  libarchive
  libsoup3
  libxml2
  webkit2gtk-4.1
)
makedepends=(
  git
  gobject-introspection
  meson
)
provides=(libgepub-${pkgver%.*}.so)
_commit=d1e8eeb17f2e3a3b0f164d2bf61bcd5cee7d1629  # tags/0.7.1^0
source=("git+$url.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd libgepub
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd libgepub
}

build() {
  arch-meson libgepub build
  meson compile -C build
}

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

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

# vim:set sw=2 sts=-1 et:
