# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-memory-usage
pkgver=0.201
pkgrel=3
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Memory-Usage
pkgdesc="Tools to determine actual memory usage"
url="https://metacpan.org/release/Memory-Usage/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DO/DONEILL/Memory-Usage-$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
}

sha512sums="
4e34869ca1c97c39224c784e3dd6ef945174399678bfaefa5483cfd11ee0dc4b0efbde7a9ed59f146c4515c6db935261a8fb8fd7a4431c110160c28f9a2f9292  Memory-Usage-0.201.tar.gz
"
