# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-crypt-passwdmd5
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Crypt-PasswdMD5
pkgver=1.42
pkgrel=1
pkgdesc="Provide interoperable MD5-based crypt() functions"
url="https://metacpan.org/release/Crypt-PasswdMD5/"
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/R/RS/RSAVAGE/Crypt-PasswdMD5-$pkgver.tgz"
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="
92b18cb50061ff0d017e26ebeb4ebf07199d7833518974c3f130d81a30f37a01cd299f4776bfa1e8cd1ca4e6e5adcd72d93ea4dcfed7a573084f0a9c7245eef8  Crypt-PasswdMD5-1.42.tgz
"
