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

_realname=Parallel-ForkManager
pkgname=perl-${_realname}
pkgver=2.04
pkgrel=1
pkgdesc="A simple parallel processing fork manager"
arch=('any')
url="https://metacpan.org/dist/Parallel-ForkManager"
msys2_references=(
  'anitya: 5674'
  'archlinux: perl-parallel-forkmanager'
  'cpe: cpe:/a:cpan:parallel%3a%3aforkmanager'
  'gentoo: dev-perl/Parallel-ForkManager'
  'purl: pkg:cpan/YANICK/Parallel-ForkManager'
)
groups=('perl-modules')
depends=('perl' 'perl-Moo')
makedepends=('perl-ExtUtils-MakeMaker')
#checkdepends=('perl-test-warn')
license=('spdx:Artistic-1.0-Perl',  'spdx:GPL-1.0-or-later')
source=("https://cpan.metacpan.org/authors/id/Y/YA/YANICK/${_realname}-${pkgver}.tar.gz")
sha256sums=('606894fc2e9f7cd13d9ec099aaac103a8f0943d1d80c2c486bae14730a39b7fc')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

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

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