# Automatically generated by apkbuild-cpan, template 3
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-datetime-format-natural
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=DateTime-Format-Natural
pkgver=1.18
pkgrel=0
pkgdesc="Parse informal natural language date/time strings"
url="https://metacpan.org/release/DateTime-Format-Natural/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-datetime-timezone perl-clone perl-params-validate
	perl-list-moreutils perl-datetime perl-boolean
	perl-datetime-hires perl-module-util
	"
makedepends="perl-module-build"
checkdepends="perl-test-mocktime-hires"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/S/SC/SCHUBIGER/DateTime-Format-Natural-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

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

check() {
	./Build test
}

package() {
	./Build install --destdir="$pkgdir"
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="
ec57179399e1539a0e22379794cf927337f682ca168de7f48338598c27d6ea70a1901a47e232c574d89e7e234930e09aa995309b40e171f99f22a24a95236b82  DateTime-Format-Natural-1.18.tar.gz
"
