# Automatically generated by apkbuild-cpan, template 4
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-datetime-locale
pkgver=1.44
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=DateTime-Locale
pkgdesc="Localization support for DateTime.pm"
url="https://metacpan.org/release/DateTime-Locale/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-dist-checkconflicts perl-file-sharedir perl-namespace-autoclean
	perl-params-validationcompiler perl-specio
	"
makedepends="perl-dist-checkconflicts perl-file-sharedir-install"
checkdepends="
	perl-test-file-sharedir perl-ipc-system-simple perl-path-tiny perl-test2-plugin-nowarnings
	perl-test-simple perl-cpan-meta-check
	"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-$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

	# These just seem to be examples, and are available as man pages
	rm -v "$pkgdir"/usr/share/perl5/vendor_perl/DateTime/Locale/*.pod
}

sha512sums="
0553919b86b36923cd7afce2bc571bfe1e523eaa6460776654b0f01da8ae548791d852b76b8b017dccbd95440a2567fdf2ae960a650e88d23f56175d93bcd4aa  DateTime-Locale-1.44.tar.gz
"
