# $Id: PKGBUILD 99562 2013-10-29 20:41:35Z jsteel $
# Maintainer: Jonathan Steel <jsteel@aur.archlinux.org>
# Contributor: Justin Davis (juster) <jrcd83@gmail.com>

pkgname=perl-sub-install
pkgver=0.927
pkgrel=1
pkgdesc="Install subroutines into packages easily"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
url="https://metacpan.org/release/Sub-Install"
source=(http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Sub-Install-$pkgver.tar.gz)
md5sums=('3f3b70f651b5bc41c6ccc372b2fa3430')

build() (
  cd "$srcdir"/Sub-Install-$pkgver
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps

  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check() (
  cd "$srcdir"/Sub-Install-$pkgver
  export PERL_MM_USE_DEFAULT=1

  unset PERL5LIB
  make test
)

package() (
  cd "$srcdir"/Sub-Install-$pkgver

  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"/
)
