# $Id: PKGBUILD 205972 2014-02-15 01:19:50Z eric $
# Maintainer: 

pkgname=perl-try-tiny
pkgver=0.19
pkgrel=1
pkgdesc="Minimal try/catch with proper localization of \$@"
arch=('any')
url="http://search.cpan.org/dist/Try-Tiny"
license=('MIT')
depends=('perl')
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Try-Tiny-${pkgver}.tar.gz")
sha1sums=('78613f8c77793032ddf10a88ef5182592b96d553')

build() {
  cd Try-Tiny-${pkgver}
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Try-Tiny-${pkgver}
  make test
}

package() {
  cd Try-Tiny-${pkgver}
  make DESTDIR="$pkgdir" install
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
