# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=FFI-CheckLib
pkgname=perl-${_realname}
pkgver=0.28
pkgrel=1
pkgdesc="Check that a library is available for FFI"
arch=('any')
url="https://metacpan.org/release/FFI-CheckLib"
groups=('perl-modules')
depends=('perl')
checkdepends=('perl-Test-Exit' 'perl-Test2-Suite')
license=('PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/${_realname}-${pkgver}.tar.gz")
sha256sums=('cf377ce735b332c41f600ca6c5e87af30db6c3787f9b67d50a245d1ebe6fc350')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
