# Automatically generated by apkbuild-cpan, template 3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-digest-sha3
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Digest-SHA3
pkgver=1.05
pkgrel=2
pkgdesc="Perl extension for SHA-3"
url="https://metacpan.org/release/Digest-SHA3/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MS/MSHELOR/Digest-SHA3-$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="
ca98baa404353b1f3615b7207470c70b9e1fe12eca961348291cbdb697c3e373b745efecbdfeee9ca23d511fa0e346dea831460e61189a526ac673c989192739  Digest-SHA3-1.05.tar.gz
"
