# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-module-loader
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Module-Loader
pkgver=0.04
pkgrel=1
pkgdesc="finding and loading modules in a given namespace"
url="https://metacpan.org/release/Module-Loader/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-module-runtime perl-path-iterator-rule"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/N/NE/NEILB/Module-Loader-$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="3f1c29a6dcca1b66ddad2a4284f77684ed1586e2f7ae06ff3aa1de49504207542f3ee1222b2fc67f1f09406dde7dc247aeb719f24db65efe4f043a23f340eff9  Module-Loader-0.04.tar.gz"
