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

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

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