# Automatically generated by apkbuild-cpan, template 3
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-cpan-common-index
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=CPAN-Common-Index
pkgver=0.010
pkgrel=0
pkgdesc="Common library for searching CPAN modules, authors and distributions"
url="https://metacpan.org/release/CPAN-Common-Index/"
arch="noarch"
license="Apache-2.0"
depends="
	perl perl-class-tiny perl-tie-handle-offset
	perl-uri perl-cpan-distnameinfo
	"
checkdepends="perl-test-fatal perl-test-deep perl-test-failwarnings"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Common-Index-$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="
45dbd8baa97962b4eca995a8192553dc52c4a28b86f1e8074ae660047f31ca9198dafb0f13ea6b2a2b5b2bc72ccdd3e4ea5b007026f07822a1a1084cce16e970  CPAN-Common-Index-0.010.tar.gz
"
