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

_realname=Moo
pkgname=perl-${_realname}
pkgver=2.005004
pkgrel=1
pkgdesc="Minimalist Object Orientation (with Moose compatiblity)"
arch=('any')
url="https://metacpan.org/release/Moo"
groups=('perl-modules')
depends=('perl')
depends=('perl-Class-Method-Modifiers>=1.1' 'perl-Devel-GlobalDestruction>=0.11' 'perl-Import-Into>=1.002'
         'perl-Module-Runtime>=0.014' 'perl-Role-Tiny>=2' 'perl-Sub-Quote')
makedepends=('perl-Test-Fatal>=0.003')
license=('PerlArtistic' 'GPL')
source=("https://cpan.metacpan.org/authors/id/H/HA/HAARG/Moo-$pkgver.tar.gz")
sha256sums=('e3030b80bd554a66f6b3c27fd53b1b5909d12af05c4c11ece9a58f8d1e478928')

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

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL=--skipdeps \
  MODULEBUILDRC=/dev/null \
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

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