# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-email-mime-contenttype
_pkgreal=Email-MIME-ContentType
pkgver=1.022
pkgrel=0
pkgdesc="Parse a MIME Content-Type Header"
url="http://search.cpan.org/dist/Email-MIME-ContentType/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends="  perl-capture-tiny "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

check() {
	cd "$builddir"
	make test
}

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

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

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

sha512sums="38561922e0dbc180ac24003a3b64ef39e25a5607bbedc75a3e4580490ab84e02bfd5165225eff4884112cf1f82ec46ee62f31c047acea6b9a3cca390deb965be  Email-MIME-ContentType-1.022.tar.gz"
