Release commit for 0.004001
[scpubgit/Object-Remote.git] / Makefile.PL
CommitLineData
9e72f0cf 1use strict;
2use warnings FATAL => 'all';
f21cb0e9 3use 5.008;
9e72f0cf 4
f21cb0e9 5my %META = (
6 name => 'Object-Remote',
7 license => 'perl_5',
8 prereqs => {
9 configure => { requires => {
10 'ExtUtils::MakeMaker' => 0,
11 } },
12 build => { requires => {
13 } },
14 test => {
15 requires => {
16 'Test::More' => '0.96',
17 },
18 },
19 runtime => {
20 requires => {
21 'Moo' => 1.006,
22 'Module::Runtime' => 0,
23 'JSON::PP' => 0,
24 'Future' => 0.29,
25 'MRO::Compat' => 0, # required to fatpack Moo
26 'Class::C3' => 0, # required to fatpack Moo
27 'Devel::GlobalDestruction' => 0, # required to fatpack Moo
28 'String::ShellQuote' => 0, # required for ssh argument manipulation
29 'Log::Contextual' => 0.005000,
30 'strictures' => 2,
31 },
32 },
33 develop => {
34 requires => {
35 },
36 },
37 },
38 resources => {
39 repository => {
40 url => 'git://git.shadowcat.co.uk/scpubgit/Object-Remote.git',
41 # r/w: scpubgit@git.shadowcat.co.uk:Object-Remote.git
42 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit/Object-Remote.git',
43 type => 'git',
44 },
45 bugtracker => {
46 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Object-Remote',
47 mailto => 'bug-Object-Remote@rt.cpan.org',
48 },
49 license => [ 'http://dev.perl.org/licenses/' ],
50 },
51 no_index => {
52 directory => [ 't', 'xt' ]
9e72f0cf 53 },
f21cb0e9 54 x_authority => 'cpan:MSTROUT',
55);
56
57my %MM_ARGS = (
80d18f39 58 EXE_FILES => [
59 'bin/object-remote-node',
60 'bin/object-remote-slave',
61 'bin/remoterepl',
62 ],
9e72f0cf 63);
f21cb0e9 64
65## BOILERPLATE ###############################################################
66require ExtUtils::MakeMaker;
67(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
68
69# have to do this since old EUMM dev releases miss the eval $VERSION line
70my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
71my $mymeta = $eumm_version >= 6.57_02;
72my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
73
74($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
75($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
76$META{license} = [ $META{license} ]
77 if $META{license} && !ref $META{license};
78$MM_ARGS{LICENSE} = $META{license}[0]
79 if $META{license} && $eumm_version >= 6.30;
80$MM_ARGS{NO_MYMETA} = 1
81 if $mymeta_broken;
82$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
83 unless -f 'META.yml';
84$MM_ARGS{PL_FILES} ||= {};
85$MM_ARGS{NORECURS} = 1
86 if not exists $MM_ARGS{NORECURS};
87
88for (qw(configure build test runtime)) {
89 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
90 my $r = $MM_ARGS{$key} = {
91 %{$META{prereqs}{$_}{requires} || {}},
92 %{delete $MM_ARGS{$key} || {}},
93 };
94 defined $r->{$_} or delete $r->{$_} for keys %$r;
95}
96
97$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
98
99delete $MM_ARGS{MIN_PERL_VERSION}
100 if $eumm_version < 6.47_01;
101$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
102 if $eumm_version < 6.63_03;
103$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
104 if $eumm_version < 6.55_01;
105delete $MM_ARGS{CONFIGURE_REQUIRES}
106 if $eumm_version < 6.51_03;
107
108ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
109## END BOILERPLATE ###########################################################