# Automatically generated by apkbuild-cpan, template 2
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=perl-test-modern
_pkgreal=Test-Modern
pkgver=0.013
pkgrel=0
pkgdesc="precision testing for modern perl"
url="http://search.cpan.org/dist/Test-Modern/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-exporter-tiny perl-import-into perl-test-warnings perl-test-fatal perl-try-tiny perl-test-deep perl-test-api perl-module-runtime"
cpanmakedepends=""
cpancheckdepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
checkdepends="$cpancheckdepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/T/TO/TOBYINK/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare || return 1

	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make
}

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

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

sha512sums="b59f897662bfecb1781959fb93bcb7b8090e13fe98beb50cf55b240d9a8e731c16a46ce6db1172953f2c86fad8c201a760ce918be03259d87218023be4438896  Test-Modern-0.013.tar.gz"
