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

_realname=Net-SMTP-SSL
pkgname=perl-${_realname}
pkgver=1.04
pkgrel=1
pkgdesc="SSL support for Net::SMTP"
arch=('any')
license=('GPL' 'PerlArtistic')
url="https://metacpan.org/${_realname}/"
groups=('perl-modules')
depends=('perl-IO-Socket-SSL')
options=(!emptydirs)
source=("https://www.cpan.org/authors/id/R/RJ/RJBS/Net-SMTP-SSL-${pkgver}.tar.gz")
options=(!emptydirs)
sha256sums=('7b29c45add19d3d5084b751f7ba89a8e40479a446ce21cfd9cc741e558332a00')

build() {
  cd ${srcdir}/${_realname}-${pkgver}

  # install module in vendor directories.
  perl Makefile.PL -- INSTALLDIRS=vendor
  make
}

package() {
  cd ${srcdir}/${_realname}-${pkgver}

  make install DESTDIR=${pkgdir}
  # Remove .packlist and perllocal.pod files.
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name 'perllocal.pod' -delete
}
