# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=IO-Socket-SSL
pkgname=perl-${_realname}
pkgver=2.072
pkgrel=1
pkgdesc="Nearly transparent SSL encapsulation for IO::Socket::INET"
arch=('any')
license=('GPL' 'PerlArtistic')
url="https://metacpan.org/release/IO-Socket-SSL"
groups=('perl-modules')
depends=('perl-Net-SSLeay' 'perl' 'perl-URI')
checkdepends=('perl-IO-Socket-INET6')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/S/SU/SULLR/${_realname}-${pkgver}.tar.gz)
sha256sums=('b5bee81db3905a9069340a450a48e1e1b32dec4ede0064f5703bafb9a707b89d')

build() {
  cd ${_realname}-${pkgver}
  yes | perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd ${_realname}-${pkgver}
  make test || true
}

package() {
  cd ${_realname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
