# Automatically generated by apkbuild-cpan, template 3
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-devel-checklib
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Devel-CheckLib
pkgver=1.16
pkgrel=2
pkgdesc="check that a library is available"
url="https://metacpan.org/release/Devel-CheckLib/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
checkdepends="perl-capture-tiny"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MA/MATTN/Devel-CheckLib-$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="
919da046cdd1f48e0ccd8a7734a98f3144c0005c8303b02b43aeedcd2cfc148c78f502f26a80ea2612279e2becf4948b408d8cbd4b7cc514519c5954ae4139cb  Devel-CheckLib-1.16.tar.gz
"
