# 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.23
pkgrel=1
pkgdesc="Perl module for Config-Tiny"
url="http://search.cpan.org/dist/Config-Tiny/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/R/RS/RSAVAGE/$_pkgreal-$pkgver.tgz"

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

prepare() {
	cd "$builddir"
	if [ -e Build.PL ]; then
		perl Build.PL installdirs=vendor
	else
		PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	fi
}

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

check() {
	cd "$builddir"
	make test
}

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

sha512sums="c5c77aa18a387f181ba9bb2df8859c328073521e14163fe04fd7a104928bd68cf654eab88d24bd23e556e6ecc139dfed716fb7b8119e98cd2ab6f6915c976f01  Config-Tiny-2.23.tgz"
