# Automatically generated by apkbuild-cpan, template 3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-http-cache-transparent
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=HTTP-Cache-Transparent
pkgver=1.4
pkgrel=0
pkgdesc="Cache the result of http get-requests persistently."
url="https://metacpan.org/release/HTTP-Cache-Transparent/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-libwww"
makedepends="perl-dev perl-test-requiresinternet"
checkdepends="perl-test-pod perl-test-pod-coverage"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MA/MATTIASH/HTTP-Cache-Transparent-$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="
bd48290de4aeffe64cc4748d2f4b054abef539770dd8679f88fd24d9478819c31d7201918335404ea5ed0251d4c4f7d19926ccdeb6b4da2cecf251d2618589a4  HTTP-Cache-Transparent-1.4.tar.gz
"
