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

_realname=Scalar-List-Utils
pkgname=perl-${_realname}
pkgver=1.55
pkgrel=1
pkgdesc="A selection of general-utility list subroutines"
arch=('i686' 'x86_64')
url="https://metacpan.org/release/Scalar-List-Utils"
groups=('perl-modules')
depends=('perl')
makedepends=('libcrypt-devel')
license=('GPL' 'PerlArtistic')
source=("https://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/Scalar-List-Utils-${pkgver}.tar.gz")
sha256sums=('4d2bdc1c72a7bc4d69d6a5cc85bc7566497c3b183c6175b832784329d58feb4b')

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

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL=--skipdeps \
  PERL5LIB="" \
  MODULEBUILDRC=/dev/null \
  PERL_MM_OPT="INSTALLDIRS=vendor" \
  PERL_MB_OPT="--installdirs vendor" \
  perl Makefile.PL
  make
}

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