# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-term-progressbar
pkgver=2.21
pkgrel=0
pkgdesc="Perl/CPAN Module Term::ProgressBar : Progress bar in just ASCII  using Term"
url="http://search.cpan.org/dist/Term-ProgressBar"
arch="noarch"
license="GPL"
depends="perl-class-methodmaker perl-term-readkey perl-capture-tiny perl-test-exception"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/M/MA/MANWAR/Term-ProgressBar-$pkgver.tar.gz"
builddir="$srcdir"/Term-ProgressBar-$pkgver

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

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

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="0d778b86edffe095c8a320b52b4e9f482937e75ef17d0dcb5b3bd6cba8acc8e0fe26c893fa2b48bb5482ae13d4901d26273a796bc77152839eb5b14165b7d617  Term-ProgressBar-2.21.tar.gz"
