# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Jonathan Steel <jsteel@aur.archlinux.org>
# Contributor: Justin Davis (juster) <jrcd83@gmail.com>

pkgname=perl-test-fatal
pkgver=0.018
pkgrel=1
pkgdesc='Incredibly simple helpers for testing code with exceptions'
arch=(any)
url='https://github.com/rjbs/Test-Fatal'
license=('GPL-1.0-or-later OR Artistic-1.0-Perl')
depends=(perl perl-try-tiny)
options=(!emptydirs)
source=("$pkgname-$pkgver.tar.gz::https://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Test-Fatal-$pkgver.tar.gz")
sha512sums=('3c88d6fa62a99ad5d45d9797e54d3cbcb5fbfc3b3f901d43d5c965df80611ea4a60c28d42a5e2684091f583f430049ca31ba79e17638da1144ea4caa48356abf')
b2sums=('f7319585a3d2ee235c48de3ef984af3ecd8275c4a9510abb93f7691c5770742b42d7269c087b11c5c672ad55353664605e9934766630f81482ad4af0a190e5b9')

build() {
  cd "Test-Fatal-$pkgver"
  perl Makefile.PL
  make
}

check() {
  cd "Test-Fatal-$pkgver"
  make test
}

package() {
  cd "Test-Fatal-$pkgver"
  make INSTALLDIRS=vendor DESTDIR="$pkgdir" install
}
