# Automatically generated by apkbuild-cpan, template 3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-sub-install
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Sub-Install
pkgver=0.929
pkgrel=2
pkgdesc="install subroutines into packages easily"
url="https://metacpan.org/release/Sub-Install/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Sub-Install-$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="
f51992531607af97ff6b8700bf23a2918261d05f24886781f36e2676c130df5d109a42ad3d6f8d089a6ee2c050af27ec5fc2ef9610ee993eca6549866a4fe8d7  Sub-Install-0.929.tar.gz
"
