# Automatically generated by apkbuild-cpan, template 1
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-list-allutils
_pkgreal=List-AllUtils
pkgver=0.14
pkgrel=0
pkgdesc="Combines List::Util, List::SomeUtils and List::UtilsBy in one bite-sized package"
url="http://search.cpan.org/dist/List-AllUtils/"
arch="noarch"
license="Artistic-2.0"
cpandepends="perl-list-utilsby perl-list-someutils"
cpanmakedepends="   "
depends="$cpandepends perl-scalar-list-utils"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare || return 1

	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make && make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="1a9a292cf92cfe24d8aeb5154fb55e399eebca1063393d001bdd3c5dc19d4672012c1e0ccd84be06c12a6f1fc99021e35806ec943e5477cbf87d143b7fc2c17a  List-AllUtils-0.14.tar.gz"
