# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Maintainer: Bruno Pagani <archange@archlinux.org>

_pkg=Type-Tiny
pkgname=perl-${_pkg,,}
pkgver=2.008004
pkgrel=1
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)
source=(https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/${_pkg}-${pkgver}.tar.gz)
sha512sums=('0c2ee517a7a66d230e19306e5805aeee3e3898c568d5e9fb64263626c84e9da8ae741ff2cc46919bb46ba8c34c0d712c99f83b1f99ead4cece95f11b8a56c236')

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
}
