# Automatically generated by apkbuild-cpan, template 1
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=perl-test-warn
_pkgreal=Test-Warn
pkgver=0.32
pkgrel=0
pkgdesc="Perl extension to test methods for warnings"
url="http://search.cpan.org/dist/Test-Warn/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-sub-uplevel"
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/B/BI/BIGJ/$_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 && make test
}

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

md5sums="3210a070680ea24437ebfd2be26bbfcd  Test-Warn-0.32.tar.gz"
sha256sums="2fc516e71f9ef453be22a4619d91eb3f78df414a57dfa0fd745d3bff50bf73d2  Test-Warn-0.32.tar.gz"
sha512sums="a14d6a87cfa19d54a3055b3c94143b95788ed2a30b2813d952255891a84165f0baf8b9cad167c8d5c87870220aaeeedcfe48db73246966be6aea41ad26779e6a  Test-Warn-0.32.tar.gz"
