# Con://github.com/saltstack/salttributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=xmltv
pkgver=0.5.70
pkgrel=0
pkgdesc="Set of utilities to download tv listings and format them in xml"
url="http://xmltv.org/wiki"
arch="noarch"
license="GPL-2.0"
depends="perl-libwww perl-xml-parser perl-xml-twig perl-date-manip perl-xml-writer
	perl-timedate perl-unicode-string perl-term-readkey perl-file-slurp perl-xml-libxml
	perl-lingua-en-numbers-ordinate perl-lingua-preferred perl-compress-raw-zlib perl-io-gzip
	perl-io-compress perl-term-progressbar perl-xml-treepp"
depends_dev=""
makedepends="$depends_dev perl-dev"
install=""
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/xmltv/xmltv-$pkgver.tar.bz2"
builddir="$srcdir"/xmltv-$pkgver

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 yes | perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="36dd497dc20d296ca984ad0a1ca19f471c97cac7bfe7c5d4baeaae7faea565c36103bea10e7a7ae813c1cfc35c7ac376299edd2bf01c4c5da981cb5cca13317c  xmltv-0.5.70.tar.bz2"
