# Automatically generated by apkbuild-cpan, template 1
# Contributor: Nathan Johnson <nathan@nathanjohnson.info>
# Maintainer: Nathan Johnson <nathan@nathanjohnson.info>
pkgname=perl-constant-generate
_pkgreal=Constant-Generate
pkgver=0.17
pkgrel=0
pkgdesc="Common tasks for symbolic constants"
url="http://search.cpan.org/dist/Constant-Generate/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/M/MN/MNUNBERG/$_pkgreal-$pkgver.tar.gz"

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

prepare() {
	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 && make test
}

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

md5sums="61636afc1c0be17bc8a26ec4031eae13  Constant-Generate-0.17.tar.gz"
sha256sums="fb34eef48d7c18fe445fa2651c68d65877adc71ee674233bd11989c40c4eb870  Constant-Generate-0.17.tar.gz"
sha512sums="6984d101ec26e7d2c35b45124a6d0240910acd30f47b9947a574e3dcd5d9365bb2d1773daae30c61237b903da929b564272aaf505f446a5e7b24a50970335a21  Constant-Generate-0.17.tar.gz"
