# Maintainer: Peter Budai <peterbudai@hotmail.com>

_realname=Test-Needs
pkgname=perl-${_realname}
pkgver=0.002010
pkgrel=1
pkgdesc="Skip tests when modules not available"
arch=('any')
url="https://metacpan.org/release/Test-Needs"
msys2_references=(
  'purl: pkg:cpan/HAARG/Test-Needs'
)
groups=('perl-modules')
depends=('perl')
license=('PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/H/HA/HAARG/Test-Needs-${pkgver}.tar.gz")
sha256sums=('923ffdc78fcba96609753e4bae26b0ba0186893de4a63cd5236e012c7c90e208')

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}"
}
