]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/blobdiff - lib/CPANPLUS/Dist/Gentoo.pm
Set MODULE_AUTHOR before importing the perl-module eclass
[perl/modules/CPANPLUS-Dist-Gentoo.git] / lib / CPANPLUS / Dist / Gentoo.pm
index 196683b03e06a7b6315d211911e41d7cfafb52f9..2c8c0cfcb64aee4073e79959bf90dbd5e8ea1c2c 100644 (file)
@@ -19,11 +19,11 @@ CPANPLUS::Dist::Gentoo - CPANPLUS backend generating Gentoo ebuilds.
 
 =head1 VERSION
 
-Version 0.02_01
+Version 0.03
 
 =cut
 
-our $VERSION = '0.02_01';
+our $VERSION = '0.03';
 
 =head1 SYNOPSIS
 
@@ -36,9 +36,9 @@ our $VERSION = '0.02_01';
 
 =head1 DESCRPITON
 
-This module is a CPANPLUS backend that recursively generates Gentoo ebuilds for a given package in the specified overlay (defaults to C</usr/local/portage>), update the manifest, and even emerge it (together with its dependencies) if the user requires it. You need write permissions on the directory where Gentoo fetches its source files (usually C</usr/portage/distfiles>).
+This module is a CPANPLUS backend that recursively generates Gentoo ebuilds for a given package in the specified overlay (defaults to F</usr/local/portage>), updates the manifest, and even emerges it (together with its dependencies) if the user requires it. You need write permissions on the directory where Gentoo fetches its source files (usually F</usr/portage/distfiles>). You also need to specify the correct keyword for your architecture if it differs from the default C<x86>.
 
-The generated ebuilds are placed into the section C<perl-gcpanp>. They favour depending on C<perl-core> or C<dev-perl> rather than C<perl-gcpanp>.
+The generated ebuilds are placed into the C<perl-gcpanp> category. They favour depending on C<perl-core>, C<dev-perl> or C<perl-gcpan> (in that order) rather than C<perl-gcpanp>.
 
 =head1 INSTALLATION
 
@@ -46,7 +46,7 @@ After installing this module, you should append C<perl-gcpanp> to your F</etc/po
 
 =head1 METHODS
 
-All the methods are inherited from L<CPANPLUS::Dist::Base>. Please refer to its perldoc for precise information on what's done at each step.
+All the methods are inherited from L<CPANPLUS::Dist::Base>. Please refer to its documentation for precise information on what's done at each step.
 
 =cut
 
@@ -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";
@@ -253,6 +257,7 @@ sub create {
            . ' )';
   } @{$stat->deps};
  $d   .= "\"\n";
+ $d   .= "SRC_TEST=\"do\"\n";
 
  my $file = $stat->eb_file;
  open my $eb, '>', $file or do {