# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=simple-scan
pkgver=3.24.1
pkgrel=0
pkgdesc="Simple Scan allows you to get images from a scanner"
url="https://launchpad.net/simple-scan"
arch="all"
license="GPL-3.0"
makedepends="sane-dev dconf-dev gtk+3.0-dev colord-dev libgusb-dev vala itstool
	libxml2-utils"
subpackages="$pkgname-doc"
source="https://download.gnome.org/sources/simple-scan/${pkgver%.*}/simple-scan-$pkgver.tar.xz"
builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$builddir"
	# Regenerate ui.c with packagekit disabled
	touch src/ui.vala
}

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-schemas-compile \
		--disable-packagekit
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

check() {
	cd "$builddir"
	make check
}

sha512sums="9f0ced644b13dcaad4f1e23a6520b1cbe3c36d995fca4791383f959986cd396f123638a23dbd02a9511ef7e1c9c915b3a025e9b7e4de4542a4c180c4fe29e2b9  simple-scan-3.24.1.tar.xz"
