# Automatically generated by apkbuild-cpan, template 3
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-net-netmask
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Net-Netmask
pkgver=2.0002
pkgrel=2
pkgdesc="Understand and manipulate IP netmasks"
url="https://metacpan.org/release/Net-Netmask/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-test-useallmodules"
checkdepends="perl-test-useallmodules perl-test2-suite"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/J/JM/JMASLAK/Net-Netmask-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

# secfixes:
#   2.0000-r0:
#     - CVE-2021-29424

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="
60cd9de1cac95516515428eb7d1c883b5260333768c363b47a87bb404b13bac713746e7512ff1f52bf3e5c8344f0d38889bba44a2c84b8ddf36e969d63ea8373  Net-Netmask-2.0002.tar.gz
"
