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