# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-test-inter
pkgver=1.11
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Test-Inter
pkgdesc="framework for more readable interactive test scripts"
url="https://metacpan.org/release/Test-Inter/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/S/SB/SBECK/Test-Inter-$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
}

doc() {
	local file; find "$pkgdir" -name "*.pod" | while read -r file; do
		amove "${file#"$pkgdir"}"
	done
	default_doc
}

sha512sums="
a7e3f6f49e4a6ba60679a5c203c33585d42a2b930354bb2b948554f476409971ecf789f607fb15c5b7af785f45ff55543ef02974b91006a726fdbf27d788a5a9  Test-Inter-1.11.tar.gz
"
