# Automatically generated by apkbuild-cpan, template 3
# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-anyevent-readline-gnu
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=AnyEvent-ReadLine-Gnu
pkgver=1.1
pkgrel=0
pkgdesc="Event-based interface to Term::ReadLine::Gnu"
url="https://metacpan.org/release/AnyEvent-ReadLine-Gnu/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-anyevent perl-common-sense perl-term-readline-gnu"
makedepends="perl-canary-stability"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/AnyEvent-ReadLine-Gnu-$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="
59d7c9dae3273752d7e16e4b2931289acefcc9a1243a7a82225288e51fdac77cbf3a7c4d8e8b93715cdc8f571623665b81596767b30d16943d25a4e9001af369  AnyEvent-ReadLine-Gnu-1.1.tar.gz
"
