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

_realname=YAML-Tiny
pkgname=perl-${_realname}
pkgver=1.67
pkgrel=1
pkgdesc="Read/Write YAML files with as little code as possible"
arch=('any')
url="http://search.cpan.org/dist/${_realname}/"
groups=('perl-modules')
license=('GPL' 'PerlArtistic')
depends=('perl')
options=('!emptydirs')
source=(http://www.cpan.org/authors/id/E/ET/ETHER/${_realname}-${pkgver}.tar.gz)
md5sums=('61e0abcfb2ae5e86a74887967b372922')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

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}"
}
