# Automatically generated by apkbuild-cpan, template 1
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=perl-exception-class
_pkgreal=Exception-Class
pkgver=1.40
pkgrel=0
pkgdesc="A module that allows you to declare real exception classes in Perl"
url="http://search.cpan.org/dist/Exception-Class/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-devel-stacktrace perl-class-data-inheritable"
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/$_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="07cd7a38be5f8134955e943cf666d453  Exception-Class-1.40.tar.gz"
sha256sums="d1171f2d03a485e87eb561f34688991c17b939d2689bcda47f3f51b372669a1f  Exception-Class-1.40.tar.gz"
sha512sums="e70b0fc8c5696fcb9536d47ab003a61f5025c30937491172eae7c4975bdbd9d2e435cded09d02ddc4961d93afbd47a2c1d62a83a6173fb04f284de5abd056b1b  Exception-Class-1.40.tar.gz"
