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

pkgname=libinsane
pkgver=1.0.1
pkgrel=1
pkgdesc="Library to access scanners"
arch=(x86_64)
url="https://gitlab.gnome.org/World/OpenPaperwork/libinsane"
license=(LGPL3)
depends=(sane)
makedepends=(git gobject-introspection meson vala)
checkdepends=(cunit)
_commit=586e4e20eed1f53608ac2ce7da4358f9bb444481  # tags/1.0.1^0
source=("git+https://gitlab.gnome.org/World/OpenPaperwork/libinsane.git#commit=$_commit")
md5sums=('SKIP')

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

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

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

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