# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Alan Young <harleypig@gmail.com>

pkgname=perl-module-build
pkgver=0.4231
pkgrel=5
pkgdesc="Build, test, and install Perl modules"
arch=('any')
url="https://search.cpan.org/dist/Module-Build"
license=('PerlArtistic' 'GPL')
depends=('perl' 'perl-cpan-meta' 'perl-inc-latest')
checkdepends=('perl-par-dist' 'perl-archive-zip')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/L/LE/LEONT/Module-Build-$pkgver.tar.gz)
sha512sums=('ee1dc18a7df3fe67e7f954d5e1e071aa0a6f5bce6783b768bceb01f071e64ac8be63f410c932c7c16764e5d4f52fc664ce11a12f26f6afc75a26f79883efad70')

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

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

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