# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-exporter-tiny
pkgver=1.006003
pkgrel=1
pkgdesc="an exporter with the features of Sub::Exporter but only core dependencies"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
checkdepends=('perl-test-fatal' 'perl-test-warnings')
url='https://search.cpan.org/dist/Exporter-Tiny'
source=("https://search.cpan.org/CPAN/authors/id/T/TO/TOBYINK/Exporter-Tiny-$pkgver.tar.gz")
sha512sums=('bed019dae6cca43b35eea37daf46e62100f1325de679ab8eab89a24cf9822f889586789428e11bcd182ae0fc8dbed5ef181a22830c7fd00723d14534eb1b6d97')
_distdir="Exporter-Tiny-$pkgver"

build() {
  ( 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

    cd "$srcdir/$_distdir"
    /usr/bin/perl Makefile.PL
    make
  )
}

check() {
  cd "$srcdir/$_distdir"
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    make test
  )
}

package() {
  cd "$srcdir/$_distdir"
  make install

}

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