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

_realname=Module-Pluggable
pkgname=perl-${_realname}
pkgver=6.3
pkgrel=1
pkgdesc="automatically give your module the ability to have plugins"
arch=('any')
url="https://metacpan.org/dist/Module-Pluggable"
groups=('perl-modules')
license=('PerlArtistic')
depends=('perl')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/S/SI/SIMONW/${_realname}-${pkgver}.tar.gz")
sha256sums=('58512bb9c654746d0937770b98b559b30872d85ac24073485e5830890dd1b2a0')

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 DESTDIR="${pkgdir}"

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