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

_realname=Class-Method-Modifiers
pkgname=perl-${_realname}
pkgver=2.15
pkgrel=1
pkgdesc="provides Moose-like method modifiers"
arch=('any')
url="https://metacpan.org/dist/Class-Method-Modifiers"
msys2_references=(
  'purl: pkg:cpan/ETHER/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/${_realname}-${pkgver}.tar.gz")
sha256sums=('65cd85bfe475d066e9186f7a8cc636070985b30b0ebb1cde8681cf062c2e15fc')

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