# Automatically generated by apkbuild-cpan, template 3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-email-simple
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Email-Simple
pkgver=2.218
pkgrel=1
pkgdesc="simple parsing of RFC2822 message format and headers"
url="https://metacpan.org/release/Email-Simple/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-email-date-format"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-Simple-$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="
402b24000fbcc16f5633062576c484d96a875cdf34a729a5897ee02b1f2195f3cff6475bc45bdd19c6a2b40f106cdcbefd097842e43b312caf0bfc9a05b583fc  Email-Simple-2.218.tar.gz
"