# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-moose
_pkgreal=Moose
pkgver=2.2009
pkgrel=0
pkgdesc="A postmodern object system for Perl 5"
url="http://search.cpan.org/dist/Moose/"
arch="all"
license="GPL PerlArtistic"
cpandepends="perl-task-weaken perl-package-stash perl-class-load-xs
	perl-module-runtime perl-dist-checkconflicts perl-package-stash-xs
	perl-package-deprecationmanager perl-sub-exporter perl-params-util
	perl-devel-stacktrace perl-sub-name perl-module-runtime-conflicts
	perl-class-load perl-eval-closure perl-list-moreutils perl-try-tiny
	perl-data-optlist perl-devel-globaldestruction perl-mro-compat"
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
options="!check"
source="http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/Moose-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

check() {
	cd "$builddir"
    # we cannot run 'make test' since the test
	# suite would introduce circular dependencies.
}

prepare() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$builddir"
	make
}

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


sha512sums="dc3c0cd4cdea39436f98d7849cfb268ac8168617970b23ce3217ad11715777266208ca623297a5a2dbd2a19c00909fe9a81b1f102ed5f8a7e13845c31751c05d  Moose-2.2009.tar.gz"
