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

_realname=Authen-SASL
pkgname=perl-${_realname}
pkgver=2.16
pkgrel=2
pkgdesc="Perl/CPAN Module Authen::SASL : SASL authentication framework"
arch=('any')
license=('GPL' 'PerlArtistic')
url="https://metacpan.org/${_realname}/"
depends=('perl')
groups=('perl-modules')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/G/GB/GBARR/${_realname}-${pkgver}.tar.gz
        Authen-SASL-2.16.patch)
sha256sums=('6614fa7518f094f853741b63c73f3627168c5d3aca89b1d02b1016dc32854e09'
            '2f0905d3a1f3e23d8768b4efeee0e93e4dfed058b10ba2600dcaa7a91084b620')

prepare() {
  cd ${_realname}-${pkgver}
  patch -p1 -i ${srcdir}/Authen-SASL-2.16.patch
}

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

package() {
  cd ${_realname}-${pkgver}
  make pure_install doc_install DESTDIR=$pkgdir
  find $pkgdir -name '.packlist' -delete
  find $pkgdir -name '*.pod' -delete
}
