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

_realname=Sub-Info
pkgname=perl-${_realname}
pkgver=0.002
pkgrel=3
pkgdesc="Tool for inspecting subroutines"
arch=('any')
url="https://metacpan.org/dist/Sub-Info"
msys2_references=(
  'purl: pkg:cpan/EXODIST/Sub-Info'
)
groups=('perl-modules')
license=('PerlArtistic')
depends=('perl-Importer')
options=('!emptydirs')
source=("https://search.cpan.org/CPAN/authors/id/E/EX/EXODIST/${_realname}-${pkgver}.tar.gz")
sha256sums=('ea3056d696bdeff21a99d340d5570887d39a8cc47bff23adfc82df6758cdd0ea')

build() {
  cd  "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

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

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

  find ${pkgdir} -name '.packlist' -delete
  find ${pkgdir} -name '*.pod' -delete
}
