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

pkgname=perl-libwww
pkgver=6.13
pkgrel=1
pkgdesc="The World-Wide Web library for Perl"
arch=('any')
url="https://metacpan.org/release/libwww-perl"
groups=('perl-modules')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl' 'perl-Encode-Locale' 'perl-File-Listing'
         'perl-HTML-Parser' 'perl-HTTP-Cookies' 'perl-HTTP-Daemon'
         'perl-HTTP-Date' 'perl-HTTP-Negotiate' 'perl-LWP-MediaTypes'
         'perl-Net-HTTP' 'perl-URI' 'perl-WWW-RobotRules'
         'perl-HTTP-Message')
optdepends=('perl-LWP-Protocol-HTTPS: for https:// url schemes')
source=(http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/libwww-perl-${pkgver}.tar.gz)
sha1sums=('d0f2583e9d1203b10ac26c07ce0cbbbeb42f91e3')

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

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

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