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

_realname=Term-Table
pkgname=perl-${_realname}
pkgver=0.015
pkgrel=1
pkgdesc="Format a header and rows into a table"
arch=('any')
url="https://metacpan.org/release/Term-Table"
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=('d8a18b2801f91f0e5d747147ce786964a76f91d18568652908a3dc06a9b948d5')

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
}
