# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=unpaper
pkgver=6.1
pkgrel=0
pkgdesc="post-processing tool for scanned sheets of paper"
url="https://github.com/Flameeyes/unpaper"
arch="all"
license="GPL"
depends=""
depends_dev="ffmpeg-dev"
makedepends="$depends_dev automake autoconf libtool libxslt"
install=""
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Flameeyes/unpaper/tarball/unpaper-$pkgver"
builddir="$srcdir/Flameeyes-unpaper-5e7fdc7"

build() {
	cd "$builddir"
	autoreconf -vif
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

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

check() {
	"$builddir"/unpaper --help > /dev/null
}

sha512sums="96e4f5748f836044d47a08b5c61f4367c8497d64b61e588a38b11ae99261a051c2c77e61aef85803dcd904aa8b03d78a5fa1c467bb3e632dbe9dbd68c4719557  unpaper-6.1.tar.gz"
