# $Id: PKGBUILD 97808 2013-09-29 22:15:51Z jsteel $
# Maintainer: Jonathan Steel <jsteel@aur.archlinux.org>
# Contributor: Justin Davis (juster) <jrcd83@gmail.com>

pkgname=perl-test-fatal
pkgver=0.013
pkgrel=1
pkgdesc="Incredibly simple helpers for testing code with exceptions"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-try-tiny')
url="https://metacpan.org/release/Test-Fatal"
source=(http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Test-Fatal-$pkgver.tar.gz)
md5sums=('e3d13b3c7e42f4574c843aca5d9f4570')

build() (
  cd "$srcdir/Test-Fatal-$pkgver"

  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT

  /usr/bin/perl Makefile.PL
  make
)

check() (
  cd "$srcdir/Test-Fatal-$pkgver"

  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB

  make test
)

package() (
  cd "$srcdir/Test-Fatal-$pkgver"

  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
)
