# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org>
pkgname=perl-html-scrubber
_pkgname=HTML-Scrubber
pkgver=0.17
pkgrel=0
pkgdesc="Perl HTML sanitiser"
url="https://metacpan.org/release/HTML-Scrubber"
arch="noarch"
options="!check"  # insane amount of test pods that no other module uses
license="Artistic-1.0-Perl OR GPL-2.0-only"
depends="perl-html-parser"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/N/NI/NIGELM/HTML-Scrubber-$pkgver.tar.gz"
builddir="$srcdir/HTML-Scrubber-$pkgver"

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 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="d6e04374d4da390d22cc4d51bfe2910078effc30d6d2ddc36dbc1b94ada12333c2f9c7acb1f444f777f9e268aed90ba8ea15c4c74a8b5ab955fe97ef04469ba7  HTML-Scrubber-0.17.tar.gz"