# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org>
pkgname=perl-html-tree
_pkgreal=HTML-Tree
_author=KENTNL
_au=${_author%%"${_author#??}"}
_a=${_author%%"${_author#?}"}
pkgver=5.07
pkgrel=0
pkgdesc="DOM tree structure parser for Perl"
url="https://metacpan.org/release/HTML-Tree"
arch="noarch"
license="Artistic-1.0-Perl OR GPL-2.0-only"
depends="perl-html-parser"
checkdepends="perl-test-fatal"
makedepends="perl-dev perl-module-build"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	perl Build.PL --destdir="$pkgdir" --prefix="/usr" --installdirs=vendor
	./Build
}

check() {
	./Build test
}

package() {
	./Build install destdir="$pkgdir"
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="a1faaf547d7db323388d5f6b289ab96887de5a80add55aefd380e4b540948514550a86785bdccf0776dfff38085b6bd3e98228f96231264217adcfc2f132c5de  HTML-Tree-5.07.tar.gz"