# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-test-mockrandom
_pkgreal=Test-MockRandom
pkgver=1.01
pkgrel=1
pkgdesc="Replaces random number generation with non-random number generation"
url="http://search.cpan.org/dist/Test-MockRandom/"
arch="noarch"
license="Apache-2.0"
cpandepends=""
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/$_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="e222bd0d3d7673b403e80d1633ddaca0ee35f96f2245e8df859d661edc7efc09b9a96d3718f25b6614395d1f24d66c9498e842cec476cf8c5b12464d585f85e7  Test-MockRandom-1.01.tar.gz"
