# Automatically generated by apkbuild-cpan, template 2
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
setvar pkgname = 'perl-algorithm-c3'
setvar _pkgreal = 'Algorithm-C3'
setvar pkgver = '0.10'
setvar pkgrel = '0'
setvar pkgdesc = ""A module for merging hierarchies using the C3 algorithm""
setvar url = ""http://search.cpan.org/dist/Algorithm-C3/""
setvar arch = ""noarch""
setvar license = ""GPL PerlArtistic""
setvar cpandepends = """"
setvar cpanmakedepends = """"
setvar cpancheckdepends = """"
setvar depends = "$cpandepends"
setvar makedepends = ""perl-dev $cpanmakedepends""
setvar checkdepends = "$cpancheckdepends"
setvar subpackages = ""$pkgname-doc""
setvar source = ""http://search.cpan.org/CPAN/authors/id/H/HA/HAARG/$_pkgreal-$pkgver.tar.gz""
setvar builddir = ""$srcdir/$_pkgreal-$pkgver""

proc 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
}

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

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

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

setvar sha512sums = ""2ace81679e8ff2f3f3fbe8028741aef0833b1415a7cde0d1b20c90557889347685d1135029cd849324b6d40c435a80b228549bf669bbf43f9a1b2ed7075b605e  Algorithm-C3-0.10.tar.gz""