# Automatically generated by apkbuild-cpan, template 3
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=perl-yaml-pp
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=YAML-PP
pkgver=0.38.0
pkgrel=0
pkgdesc="YAML 1.2 Processor"
url="https://metacpan.org/release/YAML-PP/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
checkdepends="perl-test-warn perl-test-deep perl-tie-ixhash"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/T/TI/TINITA/YAML-PP-v$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-v$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

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

sha512sums="
2c503e675068d3c2903c3a862651417a1320647469cae74a029bc80e5a67dd7694264711aa00a2ff074b2fd0dd9ea631d5010980fb9166709e82dd9cc366dfa9  YAML-PP-v0.38.0.tar.gz
"
