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

_perlname='LWP-Protocol-https'
_realname="${_perlname,,}"
pkgname=perl-${_realname}
pkgver=6.17
pkgrel=2
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=('spdx:Artistic-1.0-Perl' 'spdx:GPL-1.0-or-later')
depends=('perl' 'perl-io-socket-ssl' 'perl-mozilla-ca' 'perl-net-http' 'perl-libwww')
provides=("perl-LWP-Protocol-https=${pkgver}")
conflicts=('perl-LWP-Protocol-https')
replaces=('perl-LWP-Protocol-https')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/O/OA/OALDERS/${_perlname}-${pkgver}.tar.gz")
sha256sums=('361c7c1eee8cf66812958f975f26ef2e2272a0c6221d2043477cb9c22b8d1c23')

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

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

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