# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=HTML-Parser
pkgname=perl-${_realname}
pkgver=3.83
pkgrel=2
pkgdesc="Perl HTML parser class"
arch=('i686' 'x86_64')
license=('spdx:Artistic-1.0-Perl' 'spdx:GPL-1.0-or-later')
url="https://metacpan.org/dist/HTML-Parser"
msys2_references=(
  'purl: pkg:cpan/OALDERS/HTML-Parser'
)
groups=('perl-modules')
depends=('perl-HTML-Tagset' 'perl-HTTP-Message' 'perl-URI' 'perl')
makedepends=('perl-devel' 'make' 'gcc')
checkdepends=('perl-Test-Pod')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/O/OA/OALDERS/${_realname}-${pkgver}.tar.gz)
sha256sums=('7278ce9791256132b26a71a5719451844704bb9674b58302c3486df43584f8c0')

build() {
  cd ${_realname}-${pkgver}
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd ${_realname}-${pkgver}
  make test
}

package() {
  cd ${_realname}-${pkgver}
  make install DESTDIR="${pkgdir}"
}
