X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git;a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=a696b77d7627ac6793de7b5510069fb7458552dc;hp=22059a90b65ce689f5ea391267da16a61c9276b4;hb=9a88cbe7efd58f6ee7099d7286cd9c364e0946ed;hpb=192c16f35be72d6b51e01855a15905313d407814 diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 22059a9..a696b77 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -110,7 +110,7 @@ sub init { my $stat = $self->status; my $conf = $self->parent->parent->configure_object; - $stat->mk_accessors(qw/name version author distribution desc uri license + $stat->mk_accessors(qw/name version author distribution desc uri src license deps eb_name eb_version eb_dir eb_file fetched_arch portdir_overlay overlay distdir keywords do_manifest header footer @@ -322,6 +322,13 @@ sub prepare { $stat->uri('http://search.cpan.org/dist/' . $name); + unless ($author =~ /^(.)(.)/) { + error 'Wrong author name -- aborting'; + return 0; + } + $stat->src("mirror://cpan/modules/by-authors/id/$1/$1$2/$author/" + . $mod->package); + $stat->license([ qw/Artistic GPL-2/ ]); my $prereqs = $mod->status->prereqs; @@ -389,8 +396,10 @@ sub create { my $d = $stat->header; $d .= "# Generated by CPANPLUS::Dist::Gentoo version $VERSION\n\n"; $d .= 'MODULE_AUTHOR="' . $stat->author . "\"\ninherit perl-module\n\n"; + $d .= 'S="${WORKDIR}/' . $stat->distribution . "\"\n"; $d .= 'DESCRIPTION="' . $stat->desc . "\"\n"; - $d .= 'HOMEPAGE="' . $stat->uri . "\"\n\n"; + $d .= 'HOMEPAGE="' . $stat->uri . "\"\n"; + $d .= 'SRC_URI="' . $stat->src . "\"\n"; $d .= "SLOT=\"0\"\n"; $d .= 'LICENSE="|| ( ' . join(' ', sort @{$stat->license}) . " )\"\n"; $d .= 'KEYWORDS="' . join(' ', sort @{$stat->keywords}) . "\"\n";