# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer:

pkgname=perl-cpan-requirements-dynamic
_pkgname=CPAN-Requirements-Dynamic
pkgver=0.001
pkgrel=2
pkgdesc='Dynamic prerequisites in meta files'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl-cpan-meta-requirements>=2.143'
         perl-extutils-config)
url='https://metacpan.org/dist/CPAN-Requirements-Dynamic'
source=(https://cpan.metacpan.org/authors/id/L/LE/LEONT/$_pkgname-$pkgver.tar.gz)
sha512sums=('d4aba77f52f47c7399164762285e5c42e5eb4ffc5e7c13cf993e8c45975e9e96ac5d6db25817ab88dfa7ba0acdd69109b47dcf193c7cffe890044cfc660a951a')

build() {
  cd $_pkgname-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd $_pkgname-$pkgver
  export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
  make test
}

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