# $Id: PKGBUILD 151304 2012-02-25 13:21:24Z pierre $
# Maintainer: kevin <kevin@archlinux.org>

pkgname=perl-string-shellquote
_realname=String-ShellQuote
pkgver=1.04
pkgrel=2
pkgdesc="Quote strings for passing through the shell"
arch=('any')
license=('GPL')
url="http://search.cpan.org/dist/${_realname}/"
depends=('perl')
replaces=('string-shellquote')
source=("http://www.cpan.org/modules/by-module/URI/ROSCH/${_realname}-${pkgver}.tar.gz")
options=('!emptydirs')
md5sums=('da6329dc482b21adf5697cfbd2ac5412')

build() {
  cd ${srcdir}/${_realname}-${pkgver}
  # install module in vendor directories.
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

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

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

  # remove perllocal.pod and .packlist
  find ${pkgdir} -name perllocal.pod -delete
  find ${pkgdir} -name .packlist -delete
}
