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

_realname=Term-Table
pkgname=perl-${_realname}
pkgver=0.024
pkgrel=1
pkgdesc="Format a header and rows into a table"
arch=('any')
url="https://metacpan.org/dist/Term-Table"
msys2_references=(
  'purl: pkg:cpan/EXODIST/Term-Table'
)
groups=('perl-modules')
license=('spdx:Artistic-1.0-Perl' 'spdx:GPL-1.0-or-later')
depends=()
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/E/EX/EXODIST/${_realname}-${pkgver}.tar.gz")
sha256sums=('52288538c3b0514bcd2b61f645686c256619e56a421ae992e2b76d31927c4ece')

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
}
