# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-net-ssleay
_realname=Net-SSLeay
pkgver=1.82
pkgrel=0
pkgdesc="Perl extension for using OpenSSL"
url="http://search.cpan.org/dist/Net-SSLeay/"
arch="all"
license="GPL"
depends="perl"
makedepends="perl-dev libressl-dev zlib-dev"
checkdepends="perl-test-exception perl-test-warn perl-test-nowarnings"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/M/MI/MIKEM/Net-SSLeay-$pkgver.tar.gz"
builddir="$srcdir/$_realname-$pkgver"

build() {
	cd "$builddir"

	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
	make
}

check() {
	cd "$builddir"

	make test
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}

sha512sums="758c41f4916a55b5085167e5c6a2732a5ee70dbeb8f42e791cd957957ba4a59f724c072d3fa50a6b42ae3b22cf3ecb8738c3f8963990a7030117b73c2dcc0716  Net-SSLeay-1.82.tar.gz"
