# Automatically generated by apkbuild-cpan, template 2
# Contributor: Nick Andrew <nick@nick-andrew.net>
# Maintainer: Nick Andrew <nick@nick-andrew.net>
pkgname=perl-proc-guard
_pkgreal=Proc-Guard
pkgver=0.07
pkgrel=0
pkgdesc="process runner with RAII pattern"
url="http://search.cpan.org/dist/Proc-Guard/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-class-accessor-lite"
cpanmakedepends="perl-test-requires perl-module-build"
cpancheckdepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
checkdepends="$cpancheckdepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/T/TO/TOKUHIROM/$_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 && ./Build test
}

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


sha512sums="1f27f7b1ee3116f3136cc4b310751bf0ab5f04a8698ce619cf94341c26e293f8c331126c636c6dd1dcc3b85724b60b22ea553b9c9f85624c59924dc89c2b6ac4  Proc-Guard-0.07.tar.gz"
