# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-test-yaml
_pkgreal=Test-YAML
pkgver=1.06
pkgrel=1
pkgdesc="Testing Module for YAML Implementations"
url="http://search.cpan.org/dist/Test-YAML/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-test-base"
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/I/IN/INGY/$_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 || return 1
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="f6fe4bf46a8cc5ea92b5275cc704e79266b11769bd476888b202540a6d9a23a59a2550503afd88a72f9832355e2b48983f6a31f60db07abe5b0e15f4e74ae2e2  Test-YAML-1.06.tar.gz"
