# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-io-socket-ssl
_pkgreal=IO-Socket-SSL
pkgver=2.048
pkgrel=1
pkgdesc="Nearly transparent SSL encapsulation for IO::Socket::INET"
url="http://search.cpan.org/dist/IO-Socket-SSL/"
arch="noarch"
license="GPL PerlArtistic"
depends="ca-certificates perl-net-libidn perl-net-ssleay"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/S/SU/SULLR/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$builddir"
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="649aa7f4ed8c7c1f4725bd48e28c40d3929f0c7c7fc40093f6e4d373ea8e306451c2fc3f645a23a33d99cd3a5a378997f7affb2b165d883648c33fc801cfce67  IO-Socket-SSL-2.048.tar.gz"
