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

_realname=Class-Method-Modifiers
pkgname=perl-${_realname}
pkgver=2.13
pkgrel=1
pkgdesc="provides Moose-like method modifiers"
arch=('any')
url="https://search.cpan.org/dist/Class-Method-Modifiers"
groups=('perl-modules')
depends=('perl')
makedepends=('perl-Test-Fatal' 'perl-Test-Requires' 'perl-Test-Needs')
license=('GPL' 'PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/E/ET/ETHER/Class-Method-Modifiers-${pkgver}.tar.gz")
sha256sums=('ab5807f71018a842de6b7a4826d6c1f24b8d5b09fcce5005a3309cf6ea40fd63')

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

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

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