# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Joeny Ang <ang(dot)joeny(at)gmail(dot)com>

pkgname=simple-scan
pkgver=40.1
pkgrel=1
pkgdesc="Simple scanning utility"
url="https://gitlab.gnome.org/GNOME/simple-scan"
arch=(x86_64)
license=(GPL3)
groups=(gnome)
depends=(sane dconf gtk3 colord-sane libgusb libhandy)
makedepends=(yelp-tools meson vala git)
_commit=bdc7c4f30f70abb71de5afcc094415bcdb05de08  # tags/40.1^0
source=("git+https://gitlab.gnome.org/GNOME/simple-scan.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

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

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

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