# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-ryu-async
pkgver=0.020
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Ryu-Async
pkgdesc="IO::Async support for Ryu stream management"
url="https://metacpan.org/release/Ryu-Async/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-curry perl-future perl-future-asyncawait
	perl-io-async perl-log-any perl-namespace-clean
	perl-ryu perl-syntax-keyword-try perl-uri-tcp
	"
checkdepends="
	perl-indirect perl-test-checkdeps perl-test-deep
	perl-test-fatal perl-test-refcount
	perl-variable-disposition
	"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/T/TE/TEAM/Ryu-Async-$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 \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

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

package() {
	make DESTDIR="$pkgdir" install
}

doc() {
	local file; find "$pkgdir" -name "*.pod" | while read -r file; do
		amove "${file#"$pkgdir"}"
	done
	default_doc
}

sha512sums="
088bdcb3d157832cc550aeff93fbe0b30288ea7f2e74ce10c525dc09820c005572e401adcaa8b938dcecee7d30e7f49d4f88699d01cca4428f903396b246912b  Ryu-Async-0.020.tar.gz
"
