# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-hook-lexwrap
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Hook-LexWrap
pkgver=0.26
pkgrel=1
pkgdesc="Lexically scoped subroutine wrappers"
url="https://metacpan.org/release/Hook-LexWrap/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
checkdepends="perl-test-simple"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/E/ET/ETHER/Hook-LexWrap-$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="
f7771d4fb8379f43fa5b864e345f4526603914c3c486c637ea07fb9e2d41569bf40948a9039fab7d10c683fb85e16a8653876613903d34cc6801fcc9e92aa58b  Hook-LexWrap-0.26.tar.gz
"
