]> git.vpit.fr Git - perl/modules/Linux-SysInfo.git/blobdiff - Makefile.PL
Importing Linux-SysInfo-0.09.tar.gz
[perl/modules/Linux-SysInfo.git] / Makefile.PL
index cf1da637c0d444da9c86297b591f362ab2c435f4..a300844723fe9f40a8ed37415334aa1423089b8a 100644 (file)
@@ -2,6 +2,21 @@ use strict;
 use warnings;
 use ExtUtils::MakeMaker;
 
+my $BUILD_REQUIRES = {
+ 'ExtUtils::MakeMaker' => 0,
+ 'Test::More'          => 0,
+};  
+    
+sub build_req {
+ my $tometa = ' >> $(DISTVNAME)/META.yml;';
+ my $build_req = 'echo "build_requires:" ' . $tometa;
+ foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) {
+  my $ver = $BUILD_REQUIRES->{$mod};
+  $build_req .= sprintf 'echo "    %-30s %s" %s', "$mod:", $ver, $tometa;
+ }  
+ return $build_req;
+}
+
 WriteMakefile(
     NAME                => 'Linux::SysInfo',
     AUTHOR              => 'Vincent Pit <perl@profvince.com>',
@@ -11,11 +26,11 @@ WriteMakefile(
     PL_FILES            => {},
     PREREQ_PM => {
         'Exporter'   => 0,
-        'Test::More' => 0,
         'XSLoader'   => 0,
     },
     dist                => {
-        PREOP => 'pod2text lib/Linux/SysInfo.pm > $(DISTVNAME)/README',
+        PREOP => 'pod2text lib/Linux/SysInfo.pm > $(DISTVNAME)/README; '
+                 . build_req,
         COMPRESS => 'gzip -9f', SUFFIX => 'gz',
     },
     clean               => { FILES => 'Linux-SysInfo-*' },