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

_realname=Role-Tiny
pkgname=perl-${_realname}
pkgver=2.002004
pkgrel=1
pkgdesc="Roles. Like a nouvelle cuisine portion size slice of Moose."
arch=('any')
url="https://search.cpan.org/dist/Role-Tiny/"
license=('PerlArtistic' 'GPL')
depends=('perl')
checkdepends=('perl-Test-Fatal>=0.003')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/H/HA/HAARG/Role-Tiny-${pkgver}.tar.gz)
sha512sums=('f66a799a0cd4e989adc173f6d913967df7aa6b9ffda934c2a80c0a91dcfe4edce606bd27cf1b4d857d52d0aa770224315ae4e915e4e735c6a9483a6cf5ce02f1')

prepare() {
  cd ${_realname}-${pkgver}
}

build() {
  cd ${_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
  make
}

check() (
  cd ${_realname}-${pkgver}
  make test
)

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