# Automatically generated by apkbuild-cpan, template 2
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=perl-mime-types
_pkgreal=MIME-Types
pkgver=2.14
pkgrel=0
pkgdesc="Definition of MIME types"
url="http://search.cpan.org/dist/MIME-Types/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
cpancheckdepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
checkdepends="$cpancheckdepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare

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

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

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

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

sha512sums="dc12df5408107cd24819affe1e374a9eba801ebd39ad5c14c40ed46e51d88379c53f4a645a5149842c92e348b3cb80b6784976d71f0dd7f73195072b668926e0  MIME-Types-2.14.tar.gz"
