# Maintainer: Allan McRae <mcrae_allan@hotmail.com>
# Contributor: Andrew Simmons <andrew.simmons@gmail.com>

pkgname=xmltv
pkgver=0.5.51
pkgrel=2
pkgdesc="Set of utilities to download tv listings and format them in xml"
arch=(i686 x86_64)
url="http://xmltv.org/wiki/"
license="GPL"
depends=('perl-archive-zip' 'perl-date-manip' 'perl-file-slurp' 'perl-html-tree' \
         'perl-http-cache-transparent' 'perl-io-stringy' 'perl-xml-libxml' \
         'perl-lingua-en-numbers' 'perl-lingua-en-numbers-ordinate' 'perl-lingua-preferred' \
         'perl-soap-lite' 'perl-term-progressbar' 'perl-term-readkey' 'perl-text-bidi' \
         'perl-text-kakasi' 'perl-timedate' 'perl-tk-tablematrix' 'perl-unicode-string' \
         'perl-unicode-utf8simple' 'perl-www-mechanize' 'perl-xml-twig' 'perl-xml-writer')
source=(http://downloads.sourceforge.net/xmltv/xmltv-${pkgver}.tar.bz2)
md5sums=('b0b3f0d31b0e7fbc2f615024faedfbb7')

build() {
  cd $startdir/src/xmltv-${pkgver}
  yes | perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor
  make || return 1
  make DESTDIR=$startdir/pkg PREFIX=/usr install
	 
  # remove perllocal.pod and .packlist
  find ${startdir}/pkg -name perllocal.pod -delete
  find ${startdir}/pkg -name .packlist -delete
}