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

_realname=IO-Socket-SSL
pkgname=perl-${_realname}
pkgver=2.095
pkgrel=1
pkgdesc="Nearly transparent SSL encapsulation for IO::Socket::INET"
arch=('any')
license=('spdx:Artistic-1.0-Perl', 'spdx:GPL-1.0-or-later')
url="https://metacpan.org/dist/IO-Socket-SSL"
msys2_references=(
  'archlinux: perl-io-socket-ssl'
  'cygwin: perl-IO-Socket-SSL'
  'purl: pkg:cpan/SULLR/IO-Socket-SSL'
)
groups=('perl-modules')
depends=('perl-Net-SSLeay' 'perl' 'perl-URI')
checkdepends=('perl-IO-Socket-INET6')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/S/SU/SULLR/${_realname}-${pkgver}.tar.gz")
sha256sums=('7e764392b1b8bd44e654183c082b75be47800e98d7cd325f0e1b76c7d9a6b768')

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
}
