# Automatically generated by apkbuild-cpan, template 3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-log-dispatch
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Log-Dispatch
pkgver=2.71
pkgrel=1
pkgdesc="Dispatches messages to one or more outputs"
url="https://metacpan.org/release/Log-Dispatch/"
arch="noarch"
license="Artistic-2.0"
depends="
	perl perl-module-runtime perl-dist-checkconflicts perl-devel-globaldestruction
	perl-namespace-autoclean perl-params-validationcompiler perl-try-tiny perl-specio
	"
checkdepends="perl-test-needs perl-test-fatal perl-ipc-run3"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Log-Dispatch-$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
	make
}

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

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

sha512sums="
b3aac1e0dab7b4c02fe98ac3c82854d9413c97510e390ace26fa5630cdaece628f9ea4e4c925ec10d1e6e386cc24617b348f5df837e6465cc9f49d465eb0e386  Log-Dispatch-2.71.tar.gz
"
