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

_realname=Mozilla-CA
pkgname=perl-${_realname}
pkgver=20200520
pkgrel=1
pkgdesc="Mozilla's CA cert bundle in PEM format"
arch=('any')
license=('GPL2' 'LGPL2.1')
options=(!emptydirs)
depends=('perl>=5.006')
url="https://metacpan.org/release/Mozilla-CA"
groups=('perl-modules')
source=("https://www.cpan.org/authors/id/A/AB/ABH/${_realname}-${pkgver}.tar.gz")
sha256sums=('b3ca0002310bf24a16c0d5920bdea97a2f46e77e7be3e7377e850d033387c726')

build() {
  cd ${_realname}-${pkgver}
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
}

check() {
  cd ${_realname}-${pkgver}
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
}

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