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

_realname=Path-Class
pkgname=perl-${_realname}
pkgver=0.35
pkgrel=1
pkgdesc="Cross-platform path specification manipulation for Perl"
arch=('any')
url="http://search.cpan.org/dist/Path-Class"
groups=('perl-modules')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
source=("http://search.cpan.org/CPAN/authors/id/K/KW/KWILLIAMS/${_realname}-${pkgver}.tar.gz")
md5sums=('575b60a5c5e22e259c1df62a59fdfe85')

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

  cd ${_realname}-${pkgver}
  /usr/bin/perl Makefile.PL
  make
}

check() {
  export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
  cd ${_realname}-${pkgver}
  make test
}

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