]> git.vpit.fr Git - perl/modules/rgit.git/blob - Makefile.PL
Require 5.8. Do not really want to support 5.6
[perl/modules/rgit.git] / Makefile.PL
1 use 5.008;
2
3 use strict;
4 use warnings;
5 use ExtUtils::MakeMaker;
6
7 my $BUILD_REQUIRES = {
8  'Cwd'                   => 0,
9  'ExtUtils::MakeMaker'   => 0,
10  'File::Spec::Functions' => 0,
11  'File::Temp'            => 0,
12  'Test::More'            => 0,
13 };  
14     
15 sub build_req {      
16  my $tometa = ' >> $(DISTVNAME)/META.yml;';
17  my $build_req = 'echo "build_requires:" ' . $tometa;
18  foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) {
19   my $ver = $BUILD_REQUIRES->{$mod};
20   $build_req .= sprintf 'echo "    %-30s %s" %s', "$mod:", $ver, $tometa;
21  }
22  return $build_req;
23 }
24
25 WriteMakefile(
26     NAME          => 'rgit',
27     AUTHOR        => 'Vincent Pit <perl@profvince.com>',
28     LICENSE       => 'perl',
29     VERSION_FROM  => 'lib/App/Rgit.pm',
30     ABSTRACT      => 'Recursively execute a command on all the git repositories in a directory tree.',
31     PL_FILES      => { },
32     EXE_FILES     => [ 'bin/rgit' ],
33     PREREQ_PM     => {
34         'Carp'                  => 0,
35         'Config'                => 0,
36         'Cwd'                   => 0,
37         'Exporter'              => 0,
38         'File::Find'            => 0,
39         'File::Spec::Functions' => 0,
40         'Object::Tiny'          => 0,
41         'POSIX'                 => 0,
42     },
43     dist          => { 
44         PREOP      => 'pod2text bin/rgit > $(DISTVNAME)/README; '
45                       . build_req,
46         COMPRESS   => 'gzip -9f', SUFFIX => 'gz'
47     },
48     clean         => { FILES => 'rgit-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt' }
49 );