# Automatically generated by apkbuild-cpan, template 3
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=perl-net-ntp
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Net-NTP
pkgver=1.5
pkgrel=1
pkgdesc="Perl extension for decoding NTP server responses"
url="https://metacpan.org/release/Net-NTP/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/A/AB/ABH/Net-NTP-$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="
37c2c944420fd50b14b8e2d2376cd4cd3c21678e5a86430db6705ddc7197e6380d058f49b2cdadcf7489a4d78f67af2898376e7cc82cbdfc3f09dddf8bc612a8  Net-NTP-1.5.tar.gz
"
