# Automatically generated by apkbuild-cpan, template 1
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-list-someutils-xs
_pkgreal=List-SomeUtils-XS
pkgver=0.55
pkgrel=0
pkgdesc="XS implementation for List::SomeUtils"
url="http://search.cpan.org/dist/List-SomeUtils-XS/"
arch="all"
license="Artistic-2.0"
cpandepends=""
cpanmakedepends="perl-test-leaktrace perl-test-warnings "
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

	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
}

check() {
	cd "$builddir"
	make test
}

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

sha512sums="44bf99ed3653c6d21fe0d0504dc6e3235ee89079b9c7cb77315f5713c0522057f8f3acbd34001bfba34cce6dfc568684c564b4fcecc700cbc780c57d36591f1f  List-SomeUtils-XS-0.55.tar.gz"
