# Automatically generated by apkbuild-cpan, template 4
# Contributor: Sheila Aman <sheila@vulpine.house>
# Maintainer: Sheila Aman <sheila@vulpine.house>
pkgname=perl-mozilla-ca
pkgver=20240924
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Mozilla-CA
pkgdesc="Mozilla's CA cert bundle in PEM format"
url="https://metacpan.org/release/Mozilla-CA/"
arch="noarch"
license="MPL-2.0"
depends="perl"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/L/LW/LWP/Mozilla-CA-$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 \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
5886ec35ce9bdc63684b519fc6a434c061a70d785cc6c9087e46cc5b1518ff71e91e07a41798ad8a67d9c55217640dd69047317f91d860f0930187986621b1d9  Mozilla-CA-20240924.tar.gz
"
