# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: Manolis Tzanidakis
# Contributor: Firmicus <francois.archlinux.org>

pkgname=perl-html-parser
pkgver=3.72
pkgrel=5
pkgdesc="Perl HTML parser class"
arch=('x86_64')
license=('PerlArtistic')
url="http://search.cpan.org/dist/HTML-Parser/"
depends=('perl-html-tagset')
checkdepends=('perl-test-pod')
options=('!emptydirs')
source=(http://www.cpan.org/authors/id/G/GA/GAAS/HTML-Parser-${pkgver}.tar.gz)
md5sums=('eb7505e5f626913350df9dd4a03d54a8')

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

check() {
  cd HTML-Parser-${pkgver}
  make test
}

package() {
  cd HTML-Parser-${pkgver}
  make install DESTDIR="${pkgdir}"
# template start; name=perl-binary-module-dependency; version=1;
if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then
	_perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);')
	_perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);')
	depends+=("perl>=$_perlver_min" "perl<$_perlver_max")
fi
# template end;
}