# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Moritz Bunkus <moritz@bunkus.org>

pkgname='perl-class-method-modifiers'
pkgver=2.15
pkgrel=4
pkgdesc="provides Moose-like method modifiers"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
makedepends=('perl-test-fatal' 'perl-test-requires' 'perl-test-needs')
url='https://search.cpan.org/dist/Class-Method-Modifiers'
source=("https://cpan.metacpan.org/authors/id/E/ET/ETHER/Class-Method-Modifiers-${pkgver}.tar.gz")
sha512sums=('427d21418516ff296b5a536a2d1f13b81b92d36f1c17c2366bc65fd2f05bf6afc7d02a4257033f53ee14d806b43e8d4322c6eac256d1c0e892926c4e7f878995')

build() {
  cd "${srcdir}/Class-Method-Modifiers-${pkgver}"
  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
  perl Makefile.PL
  make
}

check() {
  cd "${srcdir}/Class-Method-Modifiers-${pkgver}"
  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
  make test
}

package() {
  cd "${srcdir}/Class-Method-Modifiers-${pkgver}"
  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
  make install
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
