# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Sergej Pupykin <arch+pub@sergej.pp.ru>
# Contributor: John D Jones III AKA jnbek <jnbek1972 -_AT_- g m a i l -_Dot_- com>
# Generator  : CPANPLUS::Dist::Arch 1.32

pkgname='perl-yaml-libyaml'
pkgver=0.89
pkgrel=2
pkgdesc="Perl YAML Serialization using XS and libyaml"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
makedepends=()
url='https://search.cpan.org/dist/YAML-LibYAML/'
source=("https://cpan.metacpan.org/authors/id/T/TI/TINITA/YAML-LibYAML-$pkgver.tar.gz")
sha256sums=('155ab83675345c50add03311acf9dd915955707f909a2abd8b17d7792859b2ec')

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='"$pkgdir"'"     \
      PERL_MB_OPT="--installdirs vendor --destdir '"$pkgdir"'" \
      MODULEBUILDRC=/dev/null
    cd "$srcdir/YAML-LibYAML-$pkgver"
    /usr/bin/perl Makefile.PL
    make
  )
}

check() {
  cd "$srcdir/YAML-LibYAML-$pkgver"
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    make test
  )
}

package() {
  cd "$srcdir/YAML-LibYAML-$pkgver"
  make install
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
