# Maintainer: Justin "juster" Davis <jrcd83@gmail.com>
# $Id: PKGBUILD 150510 2012-02-18 11:51:33Z allan $

pkgname=perl-class-inspector
pkgver=1.27
pkgrel=1
pkgdesc="Get information about a class and its structure"
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.6.0')
url=http://search.cpan.org/dist/Class-Inspector
source=("http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Class-Inspector-${pkgver}.tar.gz")
md5sums=('52e6391cae3c2abdfcd1d450b42bba7e')
sha512sums=('e16786d32c695863b474036c494efa5ee2ea84f5c460e49fa58bb645c0332810796ddb81865f30e1c942a697556af9e26b47a4dc4300c10da37fde499f9507d8')
_distdir="${srcdir}/Class-Inspector-${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 "$_distdir"
    /usr/bin/perl Makefile.PL
    make
  )
}

check() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    cd "$_distdir"
    make test
  )
}

package() {
    cd "$_distdir"
    make DESTDIR="$pkgdir" 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: