# Maintainer: Florian Pritz <bluewind@xinu.at>

pkgname=cpanminus
pkgver=1.7044
pkgrel=5
pkgdesc='get, unpack, build and install modules from CPAN'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.8.1')
provides=("perl-app-cpanminus=$pkgver")
url=https://metacpan.org/release/App-cpanminus
source=("https://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-$pkgver.tar.gz")
md5sums=(6e76f94dced6d4672686a30d16f8e890)
sha512sums=(85e88de8fbefabdfd84fe8aeaa8294d58d63e27276cd6d8b8dfc5dc4cd6c30c12f5859f30e4930842d6d06af50c88d71358dee49c93821234c811aa39de822d7)
_ddir="App-cpanminus-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd "$srcdir/$_ddir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
