# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-config-grammar
_pkgreal=Config-Grammar
pkgver=1.12
pkgrel=0
pkgdesc="A grammar-based, user-friendly config parser"
url="http://search.cpan.org/dist/Config-Grammar/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/D/DS/DSCHWEI/$_pkgreal-$pkgver.tar.gz"

_builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	cd "$_builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$_builddir"
	make && make test
}

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

md5sums="fdf7fef8f645bd3c6ebecc73a39310b6  Config-Grammar-1.12.tar.gz"
sha256sums="7a52a3657d96e6f1f529caaa09ec3bf7dd6a245b47875382c323902f6d9590b0  Config-Grammar-1.12.tar.gz"
sha512sums="44d46019b32d891830d224b6002c2c73fd59c772b0308ac27ab68b5899bb921c74184a0c354a41c8bef3eb876eb1fdc0f07334bcaf4394d907059fae903ba12e  Config-Grammar-1.12.tar.gz"