# 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.4234
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-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=('e2bbdd64f98b424ea7fd20e2ba301d34b77c9f2ecec28e3191fda63a056a12c0fb1cab1496419e9e9b8054db1a8d3fe92e1f033cdcdf021e1a086c8859905eca')

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