# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-class-load
_pkgreal=Class-Load
pkgver=0.24
pkgrel=0
pkgdesc="a working (require "Class::Name") and more"
url="http://search.cpan.org/dist/Class-Load/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-module-runtime perl-module-implementation perl-package-stash perl-data-optlist perl-try-tiny"
cpanmakedepends="perl-test-requires perl-test-fatal perl-test-without-module"
checkdepends="perl-test-needs"
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/$_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
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="42459727fc622334336aedaa49e3dfd1aa92103c838a33b30ac61d9d9fe74512f7b1012b3c20fd1c4eaab1456545feab4d9d22b91162ecddd4683defc1b987eb  Class-Load-0.24.tar.gz"
