# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: John D Jones III <jnbek1972 -_AT_- g m a i l -_Dot_- com>

pkgname=perl-cpan-changes
pkgver=0.500004
pkgrel=1
pkgdesc="Read and write Changes files"
arch=(any)
url='https://search.mcpan.org/dist/CPAN-Changes'
license=('GPL' 'PerlArtistic')
depends=('perl' 'perl-sub-quote' 'perl-module-runtime' 'perl-moo' 'perl-type-tiny')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/H/HA/HAARG/CPAN-Changes-$pkgver.tar.gz)
sha256sums=('c0c9728743e5da7571ef358f6d7e6e54515115c8d6422f436a8d9306964cdd44')

build() {
  cd "${srcdir}"/CPAN-Changes-$pkgver

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL installdirs=vendor
  make
}

check() {
  cd "${srcdir}"/CPAN-Changes-$pkgver

  make test
}

package() {
  cd "${srcdir}"/CPAN-Changes-$pkgver

  make install DESTDIR="${pkgdir}"

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