# Automatically generated by apkbuild-cpan, template 2
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=perl-template-plugin-number-format
_pkgreal=Template-Plugin-Number-Format
pkgver=1.06
pkgrel=0
pkgdesc="unknown"
url="http://search.cpan.org/dist/Template-Plugin-Number-Format/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-template-toolkit perl-number-format"
cpanmakedepends=""
cpancheckdepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
checkdepends="$cpancheckdepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/D/DA/DARREN/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare || return 1

	cd "$builddir"
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

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

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

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

sha512sums="85ddc46618efc5a11a657f265ea63b09bd8df9f8e99122bcee5a22a23099ac8eb3c930d61382529b1e3c0b4dd663d32e30e77ac33b6d1b305475e740053001cb  Template-Plugin-Number-Format-1.06.tar.gz"
