# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-net-cidr
pkgver=0.25
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Net-CIDR
pkgdesc="Manipulate IPv4/IPv6 netblocks in CIDR notation"
url="https://metacpan.org/release/Net-CIDR/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MR/MRSAM/Net-CIDR-$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="
1a2be0cb6e9546d195462cffded702616c4c648b131425076453df6a1189255fd188018838b041579b3f1b3e6bd7afa0b67a1898f9de937fab57edab059abd2d  Net-CIDR-0.25.tar.gz
"
