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

_realname=File-Which
pkgname=perl-${_realname}
pkgver=1.27
pkgrel=1
pkgdesc="Portable implementation of which"
arch=('any')
url="https://metacpan.org/release/File-Which"
msys2_references=(
  "purl: pkg:cpan/PLICEASE/File-Which"
)
groups=('perl-modules')
depends=('perl' 'perl-Test-Script>=1.05')
license=('GPL' 'PerlArtistic')
source=("https://www.cpan.org/authors/id/P/PL/PLICEASE/${_realname}-${pkgver}.tar.gz")
sha256sums=('3201f1a60e3f16484082e6045c896842261fc345de9fb2e620fd2a2c7af3a93a')

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