# Automatically generated by apkbuild-cpan, template 3
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-io-socket-ip
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=IO-Socket-IP
pkgver=0.42
pkgrel=3
pkgdesc="Family-neutral IP socket supporting both IPv4 and IPv6"
url="https://metacpan.org/release/IO-Socket-IP/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-module-build"
source="https://cpan.metacpan.org/authors/id/P/PE/PEVANS/IO-Socket-IP-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	perl Build.PL --installdirs=vendor
	./Build
}

check() {
	./Build test
}

package() {
	./Build install --destdir="$pkgdir"
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete

	# man pages are already provided by perl-doc
	rm -rf "$pkgdir"/usr/share/man
}

sha512sums="
ba33a29deafe26ff4f947c35ec475a5ea08c62f7a8e250cd8c83ba8913070f83819f8745a7e0311d45904dc72c38da08950737ec1ca2ea9c750d790b3cf7de58  IO-Socket-IP-0.42.tar.gz
"
