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

_realname=LWP-Protocol-https
pkgname=perl-${_realname}
pkgver=6.14
pkgrel=1
pkgdesc="Provide https support for LWP::UserAgent"
arch=('any')
url="https://metacpan.org/dist/LWP-Protocol-https"
msys2_references=(
  'purl: pkg:cpan/OALDERS/LWP-Protocol-https'
)
groups=('perl-modules')
license=('PerlArtistic' 'GPL')
depends=('perl' 'perl-IO-Socket-SSL' 'perl-Mozilla-CA' 'perl-Net-HTTP' 'perl-libwww')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/O/OA/OALDERS/${_realname}-${pkgver}.tar.gz")
sha256sums=('59cdeabf26950d4f1bef70f096b0d77c5b1c5a7b5ad1b66d71b681ba279cbb2a')

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

check() {
  cd ${_realname}-${pkgver}
  make test
}

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