# 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.4229
pkgrel=3
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=('51e0d73cecf450062121c3223b1a4c6f8a8c260fc2345d1c1a5e13ddcbd2b7bc2578411ac254420e27720b9e00a8efc9a9daa3159e9cba5338a188734b35c738')

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