# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-datetime-format-flexible
pkgver=0.36
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=DateTime-Format-Flexible
pkgdesc="Flexibly parse strings and turn them into DateTime objects"
url="https://metacpan.org/release/DateTime-Format-Flexible/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-datetime perl-datetime-format-builder
	perl-datetime-timezone perl-list-moreutils
	"
checkdepends="perl-test-exception perl-test-mocktime perl-test-nowarnings"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/T/TH/THINC/DateTime-Format-Flexible-$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="
728acfa1199032add6c26eae5ad69d71592eeaa719f8be8b26d2735c200811cdc83cef2189bd358c222ae69529d09e81c019f3d26348c9f993f1927cc371c715  DateTime-Format-Flexible-0.36.tar.gz
"
