# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-xml-twig
pkgver=3.52
pkgrel=3
pkgdesc="A module for easy processing of XML"
arch=('any')
url="http://search.cpan.org/dist/XML-Twig/"
license=('GPL' 'PerlArtistic')
depends=('perl-xml-parser' 'perl-text-iconv' 'perl')
checkdepends=('perl-libwww' 'perl-test-pod' 'perl-xml-simple' 'perl-html-tree' 'perl-xml-xpath' 'perl-tie-ixhash')
options=('!emptydirs')
source=("http://www.cpan.org/authors/id/M/MI/MIROD/XML-Twig-${pkgver}.tar.gz")
sha1sums=('ce4ad6f055ea677ab5526e55677faffcc6457eb8')

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

check() {
  cd XML-Twig-${pkgver}
  make test || warning "Tests failed"
}

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