# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=testdisk
pkgver=7.0
pkgrel=4
pkgdesc="A data recovery suite"
url="http://www.cgsecurity.org/wiki/TestDisk"
arch="all"
license="GPL"
makedepends="e2fsprogs-dev ntfs-3g-dev ncurses-dev zlib-dev libjpeg-turbo-dev"
subpackages="$pkgname-doc"
source="http://www.cgsecurity.org/$pkgname-$pkgver.tar.bz2"
builddir="$srcdir"/$pkgname-$pkgver

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

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

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

sha512sums="b1ebe1d2fca453660a17623b70c06e0195cb5f07056fb7bc683d575c034fb71dfb793582c804dcff0ca57789a6de84bbf13b1a554353811660996e42199102e2  testdisk-7.0.tar.bz2"
