# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=perl-libwww
pkgver=6.77
pkgrel=1
pkgdesc="The World-Wide Web library for Perl"
arch=('any')
url="https://metacpan.org/release/libwww-perl"
license=('PerlArtistic' 'GPL')
depends=('perl' 'perl-encode-locale' 'perl-file-listing'
         'perl-html-parser' 'perl-http-cookies' 'perl-http-daemon' 'perl-http-cookiejar'
         'perl-http-date' 'perl-http-negotiate' 'perl-lwp-mediatypes'
         'perl-net-http' 'perl-try-tiny' 'perl-uri' 'perl-www-robotrules')
optdepends=('perl-lwp-protocol-https: for https:// url schemes')
checkdepends=('perl-test-fatal' 'perl-test-needs' 'perl-test-requiresinternet')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-$pkgver.tar.gz)
sha512sums=('66aa1928da3362a496da543473a0ce1a7cc3885ebb5bf449ab0cdd18ce7836835b80ec8919cf6d0e63107eda03e1fe9d05ba39422a32e144034ef02632d43659')

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

check()  {
  cd libwww-perl-$pkgver
  make test
}

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