# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Maintainer: Bruno Pagani <archange@archlinux.org>

_pkg=Type-Tiny
pkgname=perl-${_pkg,,}
pkgver=2.004000
pkgrel=2
pkgdesc="Tiny, yet Moo(se)-compatible type constraint"
arch=(any)
url="https://metacpan.org/release/${_pkg}"
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=(perl perl-exporter-tiny)
checkdepends=(perl-test-simple)
source=(https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/${_pkg}-${pkgver}.tar.gz)
sha512sums=('a28a0fdfe48c8ce7f7313bfa6645094337dfb12d76401d9947a649763379a912f480ff418f0023d1e0c5851ffa347823669192a9eb8081341db7525d84c82220')

build() {
    cd ${_pkg}-${pkgver}
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

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

package() {
    cd ${_pkg}-${pkgver}
    make INSTALLDIRS=vendor DESTDIR="${pkgdir}" install
}
