# Description: Mozilla's CA cert bundle in PEM format
# URL: https://metacpan.org/release/Mozilla-CA
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on:

name=p5-mozilla-ca
version=20230801
release=1
source=(https://cpan.metacpan.org/authors/id/L/LW/LWP/Mozilla-CA-$version.tar.gz)

# unpack_source() {{{
unpack_source() {
  mkdir $SRC/tarballs
  for file in ${source[@]}; do
    case ${file##*/} in
      Mozilla-CA-$version.tar.gz)
        echo "Unpacking $(get_filename $file)"
        bsdtar -p -o -C $SRC -xf $(get_filename $file) ;;
      *)
        cp $(get_filename $file) $SRC ;;
    esac
  done
}
# }}}

build() {
  cd Mozilla-CA-$version
  perl Makefile.PL INSTALLDIRS=vendor
  make
  make DESTDIR=$PKG install
  find $PKG \( -name '.packlist' -o -name '*.pod' \) -delete
}
