# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-datetime-hires
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=DateTime-HiRes
pkgver=0.04
pkgrel=1
pkgdesc="Create DateTime objects with sub-second current time resolution"
url="https://metacpan.org/release/DateTime-HiRes/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-datetime"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-HiRes-$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
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

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

sha512sums="
5e0a8c3e0efd4b50a6057e56200735c5457edbc99005cea4620f2b6c095c47b283b62b2d6f06a8ddc2886c9020cb0e32f9fb33c8fd711210c67bc8391fa57bc3  DateTime-HiRes-0.04.tar.gz
"
