# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Justin Davis (juster) <jrcd83@gmail.com>

pkgname=perl-async-interrupt
pkgver=1.25
pkgrel=3
pkgdesc='allow C/XS libraries to interrupt perl asynchronously'
arch=(x86_64)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl-canary-stability' 'perl-common-sense')
url=https://metacpan.org/release/Async-Interrupt
source=("http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/Async-Interrupt-$pkgver.tar.gz")
sha512sums=('095fde4dbf8fb9a25cbc9e07d4793f08cab7275148e53293ed3c2849c569e6ed0587ca3c4f7eeeca394f56416bb1303d90607454115792eb9e564d86be89639a')

build() {
  cd Async-Interrupt-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL
  make
}

check() {
  cd Async-Interrupt-$pkgver
  make test
}

package() {
  cd Async-Interrupt-$pkgver
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
