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

_realname=XML-NamespaceSupport
pkgname=perl-${_realname}
pkgver=1.12
pkgrel=2
pkgdesc="Generic namespace helpers (ported from SAX2)"
arch=('any')
url="https://metacpan.org/dist/XML-NamespaceSupport"
msys2_references=(
  "purl: pkg:cpan/PERIGRIN/XML-NamespaceSupport"
)
groups=('perl-modules')
license=('GPL')
depends=('perl')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/P/PE/PERIGRIN/${_realname}-${pkgver}.tar.gz")
sha256sums=('47e995859f8dd0413aa3f22d350c4a62da652e854267aa0586ae544ae2bae5ef')

prepare() {
  cd  "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd  "${srcdir}/${_realname}-${pkgver}"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "${srcdir}/${_realname}-${pkgver}"

  make install DESTDIR="${pkgdir}"

  find ${pkgdir} -name '.packlist' -delete
  find ${pkgdir} -name '*.pod' -delete
}
