# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org>
pkgname=perl-html-formattext-withlinks
_pkgreal=HTML-FormatText-WithLinks
_author=STRUAN
_au=${_author%%"${_author#??}"}
_a=${_author%%"${_author#?}"}
pkgver=0.15
pkgrel=0
pkgdesc="Perl-based HTML-to-text converter with links as footnotes"
url="https://metacpan.org/release/HTML-FormatText-WithLinks"
arch="noarch"
license="Artistic-1.0-Perl OR GPL-2.0-only"
depends="perl-html-formatter perl-html-tree perl-uri"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

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

sha512sums="cdec4ba94c3f9dfd4e9c8b03be0e24068b23b634499bce062e0b281b26ad3a0288c0d4cc35b4db62fd81ad5f0a0f9ce42a59478af10a81ca2f5901ab79cdf550  HTML-FormatText-WithLinks-0.15.tar.gz"