# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-autobox
_pkgreal=autobox
pkgver=2.85
pkgrel=1
pkgdesc="call methods on native types"
url="http://search.cpan.org/dist/autobox/"
arch="all"
license="GPL PerlArtistic"
cpandepends="perl-scope-guard"
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev perl-test-pod perl-scope-guard $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/C/CH/CHOCOLATE/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

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
}

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

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

sha512sums="2f9c0ef556655eb19a2e50aa2ec47769ef2fd7bb15806a7f22320be9d79178811c418dbe58cf792fdc48dc3e7b80b70c1882956559373cc6eb152c0b94d52081  autobox-2.85.tar.gz"
