# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-hash-ordered
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Hash-Ordered
pkgver=0.014
pkgrel=0
pkgdesc="Fast, pure-Perl ordered hash class"
url="https://metacpan.org/release/Hash-Ordered/"
arch="noarch"
license="Apache-2.0"
depends="perl"
checkdepends="perl-test-deep perl-test-failwarnings perl-test-fatal"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Hash-Ordered-$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="
077abdd3b536f5b31d913c2c0849e1775f91daa5ca83734671088ab06d9fe11cf80f743e32c5db1bf70a874248337c3bebeafceef1a6e38078f92966474480c3  Hash-Ordered-0.014.tar.gz
"
