# $Id: PKGBUILD 111840 2014-05-25 13:53:57Z bpiotrowski $
# Maintainer:
# Contributor: Maxwell Pray a.k.a. Synthead <synthead@gmail.com>
# Contributor: Caleb Cushing <xenoterracide@gmail.com>

pkgname=perl-exception-class
pkgver=1.38
pkgrel=1
pkgdesc='A module that allows you to declare real exception classes in Perl'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.8.1' 'perl-class-data-inheritable>=0.02'
         'perl-devel-stacktrace>=1.20')
url=https://metacpan.org/release/Exception-Class
source=("http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Exception-Class-$pkgver.tar.gz")
md5sums=(4d7203a95893449f53ccacb385981569)
_ddir=Exception-Class-$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
}
