From: Vincent Pit Date: Sat, 6 Dec 2008 16:16:23 +0000 (+0100) Subject: Set MODULE_AUTHOR before importing the perl-module eclass X-Git-Tag: v0.04~6 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git;a=commitdiff_plain;h=9c53ec7b95ee71dd074d77e6c0aa29d7d3b3e03e Set MODULE_AUTHOR before importing the perl-module eclass --- diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 164361c..2c8c0cf 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -67,7 +67,7 @@ sub init { my $stat = $self->status; my $conf = $self->parent->parent->configure_object; - $stat->mk_accessors(qw/name version dist desc uri src license deps + $stat->mk_accessors(qw/name version author dist desc uri src license deps eb_name eb_version eb_dir eb_file fetched_arch overlay distdir keywords do_manifest force verbose/); @@ -123,6 +123,9 @@ sub prepare { my $version = $mod->package_version; $stat->version($version); + my $author = $mod->author->cpanid; + $stat->author($author); + $stat->dist($name . '-' . $version); $version =~ s/[^\d._]+//g; @@ -231,7 +234,8 @@ sub create { } } - my $d = "# Generated by CPANPLUS::Dist::Gentoo\n\ninherit perl-module\n\n"; + my $d = "# Generated by CPANPLUS::Dist::Gentoo\n\n"; + $d .= 'MODULE_AUTHOR="' . $stat->author . "\"\ninherit perl-module\n\n"; $d .= 'S="${WORKDIR}/' . $stat->dist . "\"\n"; $d .= 'DESCRIPTION="' . $stat->desc . "\"\n"; $d .= 'HOMEPAGE="' . $stat->uri . "\"\n";