# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-statistics-basic
pkgver=1.6611
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Statistics-Basic
pkgdesc="Collection of very basic statistics modules"
url="https://metacpan.org/release/Statistics-Basic/"
arch="noarch"
license="LGPL-2.0-only"
depends="perl perl-number-format"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/J/JE/JETTERO/Statistics-Basic-$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="
10d726f9ace2a78753ec6cd91bd2c7cc7958eac11de762c3f4deff1a90e0837269484b7adc2ba22f3de128c3bf3a626cb70a9fd752a3eff5fd60db52cb7a7d68  Statistics-Basic-1.6611.tar.gz
"
