# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-digest-perl-md5
_pkgreal=Digest-Perl-MD5
pkgver=1.9
pkgrel=4
pkgdesc="Perl Implementation of Rivest's MD5 algorithm"
url="https://metacpan.org/release/Digest-Perl-MD5/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DE/DELTA/$_pkgreal-$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

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

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="015a1f046b85b5b89c1b44073d60116d483332cd667cb7230222df9651b7da837a532991e91848ff0b65f171b8870c2c4bda651da4ca54ea75d062ba6a55b525  Digest-Perl-MD5-1.9.tar.gz"
