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

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

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