# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-perl-minimumversion
pkgver=1.40
pkgrel=6
pkgdesc="Find a minimum required version of perl for Perl code"
arch=(any)
license=('PerlArtistic')
url="https://metacpan.org/release/Perl-MinimumVersion"
depends=('perl-file-find-rule' 'perl-file-find-rule-perl' 'perl-ppi' 'perl-ppix-regexp'
         'perl-params-util' 'perl-ppix-utils')
makedepends=('perl-test-script')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/D/DB/DBOOK/Perl-MinimumVersion-$pkgver.tar.gz")
sha512sums=('9416fbee46008f7745d6d0c8762e1d54e00fb708376a1d0a86c08f375627da3c10feefc0d234f68d422da892f5ac3f5caa9ea1ac6593827e2ff9b262646a6527')

build() {
  cd Perl-MinimumVersion-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Perl-MinimumVersion-$pkgver
  make test
}

package() {
  cd Perl-MinimumVersion-$pkgver
  make DESTDIR="$pkgdir" install
}
