# Automatically generated by apkbuild-cpan, template 1
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-list-someutils
_pkgreal=List-SomeUtils
pkgver=0.53
pkgrel=0
pkgdesc="Provide the stuff missing in List::Util"
url="http://search.cpan.org/dist/List-SomeUtils/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-module-implementation perl-list-someutils-xs"
cpanmakedepends="  perl-test-leaktrace "
depends="$cpandepends"
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
}

md5sums="bde33a340a9644368ac2d47d2cac8bb5  List-SomeUtils-0.53.tar.gz"
sha256sums="f4103a16f361abd163126872d949806a6b9eadf1d852be359301c9cbdbc1a598  List-SomeUtils-0.53.tar.gz"
sha512sums="baac767b92cd3062396c5f7d5570fe88b358d4c23f0705671741662f41ce859cabfb1fef100573522517fb7108f69ccc3502d901882448ed6008dde38a0560d8  List-SomeUtils-0.53.tar.gz"
