# Automatically generated by apkbuild-cpan, template 3
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-tree-simple
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Tree-Simple
pkgver=1.34
pkgrel=1
pkgdesc="A simple tree object"
url="https://metacpan.org/release/Tree-Simple/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
checkdepends="perl-test-exception"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE/Tree-Simple-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$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="cd03bdfd283d55a097bceb0c9bf3b81bb4dd5ca9a60de59e3e70b7e88b672456fd18d370f2dee1077a2afeecc973d42e78cc31f8023344b1f7e211432ef4e3ed  Tree-Simple-1.34.tgz"
