# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-config-tiny
_pkgreal=Config-Tiny
pkgver=2.30
pkgrel=0
pkgdesc="Perl module for Config-Tiny"
url="https://metacpan.org/release/Config-Tiny/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE/$_pkgreal-$pkgver.tgz"

builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare

	if [ -e Build.PL ]; then
		perl Build.PL installdirs=vendor
	else
		PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	fi
}

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

check() {
	make test
}

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

sha512sums="
2933f6a040cd712d06cccb5c511eaa914080df7ffea952f1e445f99bd021cdb9277ebd109c55365b62e713715aa431a97627ef3898df45c5b2b244270a107710  Config-Tiny-2.30.tgz
"
