# Automatically generated by apkbuild-cpan, template 4
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-crypt-openssl-x509
pkgver=2.0.1
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Crypt-OpenSSL-X509
pkgdesc="Perl extension to OpenSSL's X509 API"
url="https://metacpan.org/release/Crypt-OpenSSL-X509/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-convert-asn1"
makedepends="perl-dev openssl-dev>3 perl-crypt-openssl-guess"
checkdepends="perl-test-pod"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/J/JO/JONASBN/Crypt-OpenSSL-X509-$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="
987a033c3de1ab7ed4a3da012979bb98a8ed1f0766397f564d6996276cc254a3b79982df2f6f956da6cdfd3ad370e23d1e0656afe35ab261c2fc3e0f16b0b64b  Crypt-OpenSSL-X509-2.0.1.tar.gz
"
