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

pkgname=libinsane
pkgver=1.0.9
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=a32ee03ca64f4069ffdb34e7e599f6e9f7aa3596
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
}
