# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Florian Pritz <bluewind@archlinux.org>

pkgname=perl-cgi
pkgver=4.66
pkgrel=2
pkgdesc='Handle Common Gateway Interface requests and responses'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.8.1' perl-html-parser)
checkdepends=(perl-test-nowarnings 'perl-test-warn>=0.3')
url=https://metacpan.org/release/CGI
source=("https://cpan.metacpan.org/authors/id/L/LE/LEEJO/CGI-$pkgver.tar.gz")
md5sums=('3a03606962db6aabd2db9dddfab4b5ab')
sha512sums=('81e48d698b11b7d78c562a7b16730b97a11a85708ae9bbf599a30d6cbc12e3f6fa409e97ecc583cb47ebb6dbeb07987c08145aaeada37441192531c82b32a634')
_ddir="CGI-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd "$srcdir/$_ddir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
