# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-future
pkgver=0.51
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Future
pkgdesc="represent an operation awaiting completion"
url="https://metacpan.org/release/Future/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-module-build"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Future-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	perl Build.PL \
		--installdirs=vendor \
		--create_packlist=0
	./Build
}

check() {
	./Build test
}

package() {
	./Build install --destdir="$pkgdir"
}

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

sha512sums="
d87f565b78c09309d6931b967e7872762b5efe96d7759d8db655d85e4738962de53dc1993ee735176256de23ce0b6e38308dc84180c5659fb173aa5f9a7e7be3  Future-0.51.tar.gz
"
