# $Id: PKGBUILD 116407 2014-07-27 03:41:52Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: John D Jones III <j[nospace]n[nospace]b[nospace]e[nospace]k[nospace]1972 -_AT_- the domain name google offers a mail service at ending in dot com>
# Generator  : CPANPLUS::Dist::Arch 1.28

pkgname=perl-module-build-xsutil
pkgver=0.10
pkgrel=1
pkgdesc="A Module::Build class for building XS modules"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-devel-checkcompiler' 'perl')
makedepends=('perl-module-build')
checkdepends=('perl-file-copy-recursive' 'perl-cwd-guard' 'perl-capture-tiny')
url='http://search.cpan.org/dist/Module-Build-XSUtil'
source=("http://search.cpan.org/CPAN/authors/id/H/HI/HIDEAKIO/Module-Build-XSUtil-$pkgver.tar.gz")
sha512sums=('6c114a3f7f1829f21dff2cd0ef8dcf04aac01cbccfc176608edf1746abdcd947ea89809ebf4776319d84161273c9fd4c0f2fe7cc4aaeec284e54245dfb89fde0')
_distdir="Module-Build-XSUtil-$pkgver"

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'"     \
      PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
      MODULEBUILDRC=/dev/null

    cd "$srcdir/$_distdir"
    /usr/bin/perl Build.PL
    /usr/bin/perl Build
  )
}

check() {
  cd "$srcdir/$_distdir"
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    /usr/bin/perl Build test
  )
}

package() {
  cd "$srcdir/$_distdir"
  /usr/bin/perl Build install

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
