# Automatically generated by apkbuild-cpan, template 3
# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-io-prompter
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=IO-Prompter
pkgver=0.005001
pkgrel=0
pkgdesc="Print a prompt and process values inputted"
url="https://metacpan.org/release/IO-Prompter/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-contextual-return perl-match-simple"
checkdepends="perl-doc" # for diagnostic data
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DC/DCONWAY/IO-Prompter-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

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

sha512sums="
c304d04943450d4888aa931e091ac226712a0c5d926d75b2432cd731fa30d32bfdb2306455e876108707da87d79211060ff9dc7294554bbeeee09f69e49930d8  IO-Prompter-0.005001.tar.gz
"
