# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-crypt-jwt
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Crypt-JWT
pkgver=0.035
pkgrel=0
pkgdesc="JSON Web Token"
url="https://metacpan.org/release/Crypt-JWT/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-json perl-cryptx"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MI/MIK/Crypt-JWT-$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="
f8e579c290eef074d43946259bea163905a1c27646022d59ec425a431e5a253bc414f89331d136a10036a229f499dae8529bde3820a1baca57541e5931c8db28  Crypt-JWT-0.035.tar.gz
"
