# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-chi
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=CHI
pkgver=0.61
pkgrel=1
pkgdesc="Unified cache handling interface"
url="https://metacpan.org/release/CHI/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-time-duration perl-moo perl-carp-assert perl-time-duration-parse
	perl-moox-types-mooselike perl-digest-jhash perl-task-weaken perl-hash-moreutils
	perl-try-tiny perl-data-uuid perl-moox-types-mooselike-numeric perl-class-load
	perl-list-moreutils perl-json-maybexs perl-log-any perl-string-rewriteprefix
	"
checkdepends="perl-test-warn perl-timedate perl-test-deep perl-test-class perl-test-exception"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/A/AS/ASB/CHI-$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="
16d559af4a86e1064737f00bc36b0a50c8943a37d3ff1ac12327871798d691d9cc98c7c94710ed87749079f986a3c5ef802e95e5bcef5fb2d1c88af4c1e9a0e7  CHI-0.61.tar.gz
"
