# Automatically generated by apkbuild-cpan, template 3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-email-mime-contenttype
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Email-MIME-ContentType
pkgver=1.028
pkgrel=1
pkgdesc="Parse and build a MIME Content-Type or Content-Disposition Header"
url="https://metacpan.org/release/Email-MIME-ContentType/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-text-unidecode"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-MIME-ContentType-$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="
d6d06546fd12c238be431713d610478780866553acc6017963be0993a3796f43f39d5720b922f18cebb4e23b14f3ff03e3f3a5fee5dd9eed7afa75672fedebe5  Email-MIME-ContentType-1.028.tar.gz
"
