# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=ncdu
pkgver=1.13
pkgrel=0
pkgdesc="Text-based disk usage viewer"
url="https://dev.yorhel.nl/ncdu"
arch="all"
license="MIT"
makedepends="ncurses-dev"
subpackages="$pkgname-doc"
source="http://dev.yorhel.nl/download/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

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

check() {
	cd "$builddir"
	./ncdu -h > /dev/null
}

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

sha512sums="f1f417caa9bd9e9d9aa6311962b461e48301cf9eab5d0f57073e25df01f96ded05dd093627b95b43afc659ad99aed869efd4a98d723f5835b100747b5525a60c  ncdu-1.13.tar.gz"
