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

_realname=Module-Build
pkgname=perl-${_realname}
pkgver=0.4234
pkgrel=2
pkgdesc="Build, test, and install Perl modules"
arch=('any')
url="https://metacpan.org/release/Module-Build"
msys2_references=(
  'purl: pkg:cpan/LEONT/Module-Build'
)
license=('PerlArtistic' 'GPL')
depends=('perl>=5.8.0' 'perl-CPAN-Meta>=2.142060' 'perl-inc-latest')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/L/LE/LEONT/${_realname}-${pkgver}.tar.gz)
sha512sums=('e2bbdd64f98b424ea7fd20e2ba301d34b77c9f2ecec28e3191fda63a056a12c0fb1cab1496419e9e9b8054db1a8d3fe92e1f033cdcdf021e1a086c8859905eca')

prepare() {
  cd ${_realname}-${pkgver}
}

build() {
  cd ${_realname}-${pkgver}
  perl Build.PL installdirs=vendor
  perl Build
}

check() {
  cd ${_realname}-${pkgver}
  perl Build test
}

package() {
  cd ${_realname}-${pkgver}
  perl Build install destdir="${pkgdir}"
}
