# Contributor: Dan Theisen <djt@hxx.in>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=perl-pegex
_pkgreal=Pegex
_author=INGY
_au=${_author%%"${_author#??}"}
_a=${_author%%"${_author#?}"}
pkgver=0.75
pkgrel=0
pkgdesc="Acmeist PEG Parser Framework"
url="https://metacpan.org/pod/Pegex"
arch="noarch"
license="Artistic-1.0-Perl OR GPL-1.0+"
depends="perl perl-tie-ixhash"
checkdepends="perl-yaml-pp perl-xxx perl-test-pod"
makedepends="perl-file-sharedir-install"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

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

sha512sums="ff204b21085bc3ce5cf6dac70636443f206272ae9741055e8972eadb720d52a46e542dee5b6559cc308d9fb597d545bb4d148b02499e2f75fa08a6dc689dc30d  Pegex-0.75.tar.gz"