# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-yaml
_pkgreal=YAML
pkgver=1.24
pkgrel=0
pkgdesc="YAML Ain't Markup Language (tm)"
url="http://search.cpan.org/dist/YAML/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends="perl-test-yaml"
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/T/TI/TINITA/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$builddir"
	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="20ba196cf9c68a38154f68b884262b9f89463af5e67c1e59944070b2493f6d9515f92a2793f456e20fe7e6372b74da8f6c16b884274793b6c3aa0ed0134c340d  YAML-1.24.tar.gz"
