# Automatically generated by apkbuild-cpan, template 3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-net-telnet
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Net-Telnet
pkgver=3.05
pkgrel=1
pkgdesc="Interact with TELNET port or other TCP ports"
url="https://metacpan.org/release/Net-Telnet/"
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/J/JR/JROGERS/Net-Telnet-$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="
3864e2e6f2fb314d2d80c37597dddc0f4fe6b50c3ec96be3d823667929852fadefd0572945b3b442afe8da451fb279ad335762eeb7d328ad7f8777d3bd8e5a74  Net-Telnet-3.05.tar.gz
"
