# Description: Perl extension for using OpenSSL.
# URL: https://metacpan.org/release/Net-SSLeay
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: openssl

name=p5-net-ssleay
version=1.92
release=1
source=(https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-$version.tar.gz)

build() {
  cd Net-SSLeay-$version

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make OPTIMIZE="$CFLAGS"
  make DESTDIR=$PKG install

  # Remove perlcrap
  find $PKG -type f \( \
    -name '.packlist' -or \
    -name '*.bs' -or \
    -name 'perllocal.pod' \) -delete

  # Remove empty directories
  find $PKG -depth -empty -delete
}
