# 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-class-container
_pkgreal=Class-Container
pkgver=0.13
pkgrel=0
pkgdesc="Glues object frameworks together transparently"
url="http://search.cpan.org/dist/Class-Container/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-params-validate"
cpanmakedepends=""
cpancheckdepends=""
depends="$cpandepends"
makedepends="perl-dev perl-module-build $cpanmakedepends"
checkdepends="$cpancheckdepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/K/KW/KWILLIAMS/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	perl Build.PL installdirs=vendor
}

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

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

check() {
	cd "$builddir"
	./Build test
}

sha512sums="c51284e377942930384e22ff8d17489fa279eecc87a68acd88bffd8a134d2f2930b40008df98d12bddc46845175d2ce9f630522379692c2f630f2618928c6acd  Class-Container-0.13.tar.gz"
