# Automatically generated by apkbuild-cpan, template 2
# Contributor: Nick Andrew <nick@nick-andrew.net>
# Maintainer: Nick Andrew <nick@nick-andrew.net>
pkgname=perl-anyevent
_pkgreal=AnyEvent
pkgver=7.14
pkgrel=0
pkgdesc="unknown"
url="http://search.cpan.org/dist/AnyEvent/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=""
cpancheckdepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
checkdepends="$cpancheckdepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/$_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="98e7b9e06cf74b99d3407a25b60f3b825fceed3bae43505e1fb90785e24bd88ae25955cff25d29b4cc96957db7f4f5203d19ad2365abb4e3a3227fd91a16fb25  AnyEvent-7.14.tar.gz"
