# Automatically generated by apkbuild-cpan, template 4
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-crypt-jwt
pkgver=0.036
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Crypt-JWT
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 \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

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

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

sha512sums="
5527fd0b1ef98698e0c1985c5ff1342e56e379c01bf18c7e983a424253bb4bdf488ff1ba2a983917386496565c9553d0ae63a155a2e51be2e2ae0affcdada8d2  Crypt-JWT-0.036.tar.gz
"
