# Contributor: Wen Heping <wenheping2000@hotmail.com>
# Maintainer: Wen Heping <wenheping2000@hotmail.com>
pkgname=perl-text-simpletable
pkgver=2.07
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Text-SimpleTable
pkgdesc="Simple eyecandy ASCII tables"
url="https://metacpan.org/release/Text-SimpleTable/"
arch="noarch"
license="Artistic-2.0"
depends="perl"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MR/MRAMBERG/Text-SimpleTable-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL \
		INSTALLDIRS=vendor \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

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

sha512sums="
34e55078d5a9bb1a1eb3d074b89bfe0a3bf5a0ad670f61abfb838b05cdda1478cae0b456d9e116e6150c1157e72ee03c8f011ad565691f42a04dbd4c6068df6b  Text-SimpleTable-2.07.tar.gz
"
