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

_realname=Mozilla-CA
pkgname=perl-${_realname}
pkgver=20240924
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/dist/Mozilla-CA"
groups=('perl-modules')
source=("https://cpan.metacpan.org/authors/id/L/LW/LWP/Mozilla-CA-${pkgver}.tar.gz")
sha256sums=('c4b1412bbc37dff8cf29af6f92cb47defbe90eebcbc29e407a98638f7a31bcd0')

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"
}
