]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/commitdiff
Build the $name and the main $file from $dist
authorVincent Pit <vince@profvince.com>
Sun, 4 Oct 2009 08:21:51 +0000 (10:21 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 4 Oct 2009 08:21:51 +0000 (10:21 +0200)
Makefile.PL

index 9011218ec5118d9b6e5a574f6172121e0dab9083..77f72e59f52b738c26c8579adb99142b3a62b8ff 100644 (file)
@@ -6,6 +6,11 @@ use ExtUtils::MakeMaker;
 
 my $dist = 'CPANPLUS-Dist-Gentoo';
 
+(my $name = $dist) =~ s{-}{::}g;
+
+(my $file = $dist) =~ s{-}{/}g;
+$file = "lib/$file.pm";
+
 my %PREREQ_PM = (
  'Carp'              => 0,
  'CPANPLUS'          => 0,
@@ -38,17 +43,17 @@ my %META = (
 );
 
 WriteMakefile(
-    NAME             => 'CPANPLUS::Dist::Gentoo',
+    NAME             => $name,
     AUTHOR           => 'Vincent Pit <perl@profvince.com>',
     LICENSE          => 'perl',
-    VERSION_FROM     => 'lib/CPANPLUS/Dist/Gentoo.pm',
-    ABSTRACT_FROM    => 'lib/CPANPLUS/Dist/Gentoo.pm',
+    VERSION_FROM     => $file,
+    ABSTRACT_FROM    => $file,
     PL_FILES         => {},
     PREREQ_PM        => \%PREREQ_PM,
     MIN_PERL_VERSION => 5.006,
     META_MERGE       => \%META,
     dist             => {
-        PREOP      => 'pod2text lib/CPANPLUS/Dist/Gentoo.pm > $(DISTVNAME)/README',
+        PREOP      => "pod2text $file > \$(DISTVNAME)/README",
         COMPRESS   => 'gzip -9f', SUFFIX => 'gz'
     },
     clean            => {