# Automatically generated by apkbuild-cpan, template 4
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-net-saml2
pkgver=0.78
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Net-SAML2
pkgdesc="SAML bindings and protocol implementation"
url="https://metacpan.org/release/Net-SAML2/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-crypt-openssl-x509 perl-crypt-openssl-random perl-moosex-types-common
	perl-xml-generator perl-uri perl-http-message perl-datetime-format-xsd perl-crypt-openssl-rsa
	perl-moosex-types-datetime perl-libwww perl-moosex-types-uri perl-crypt-openssl-bignum
	perl-namespace-autoclean perl-xml-libxml perl-crypt-openssl-verify perl-datetime perl-moose
	perl-datetime-hires perl-lwp-protocol-https perl-uri-encode perl-xml-sig perl-file-slurper
	perl-xml-enc perl-urn-oasis-saml2 perl-types-serialiser perl-moosex-types perl-try-tiny
	"
checkdepends="
	perl-test-pod-coverage perl-test-lib perl-path-tiny perl-test-exception perl-test-fatal
	perl-test-deep perl-test-notabs perl-import-into perl-sub-override perl-test-pod
	perl-test-mock-one perl-moosex-test-role
	"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/T/TI/TIMLEGGE/Net-SAML2-$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="
fb37c69c3642690903d150cd2860f5394e2bb716435567e0f7b98460265c84d50ccf54ae701a5bda8bf344c99346220e5a10594b71e9bef434a0c275dceee858  Net-SAML2-0.78.tar.gz
"
