convert packaging from Module::Install to Distar; bump script somewhat modified to...
[catagits/Catalyst-Manual.git] / Makefile.PL
CommitLineData
b1a08fe1 1use strict;
840f08a4 2use warnings FATAL => 'all';
3use ExtUtils::MakeMaker;
4(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
169144c5 5
840f08a4 6my %WriteMakefileArgs = (
7 NAME => 'Catalyst::Manual',
8 VERSION_FROM => 'lib/Catalyst/Manual.pm',
9 AUTHOR => [ 'Catalyst Contributors, see Catalyst.pm', 'Kieren Diment <zarquon@cpan.org>' ],
b1a08fe1 10
840f08a4 11 META_MERGE => {
12 'meta-spec' => { version => 2 },
13 dynamic_config => 0,
14 resources => {
15 repository => {
16 # r/w: catagits@git.shadowcat.co.uk:Catalyst-Manual.git
17 url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Manual.git',
18 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Manual.git',
19 type => 'git',
20 },
21 bugtracker => {
22 mailto => 'bug-Catalyst-Manual@rt.cpan.org',
23 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Manual',
24 },
25 },
26 },
8dbc5a5b 27
840f08a4 28 META_ADD => {
29 prereqs => {
30 configure => {
31 requires => {
32 'ExtUtils::MakeMaker' => '0',
33 },
34 },
35 runtime => {
36 requires => {
37 perl => '5.006',
38 },
39 },
40 test => {
41 requires => {
42 'Test::More' => '0.88',
43 },
44 },
45 develop => {
46 requires => {
47 'Pod::Simple' => '3.11', # L<Foo|http://foo.com> support
48 'Test::Pod' => '1.14',
49 'Test::Pod::Coverage' => '1.04',
50 },
51 },
52 },
53 },
b1a08fe1 54
840f08a4 55 realclean => { FILES => [ 'Distar/', 'MANIFEST*' ] },
56);
8dbc5a5b 57
840f08a4 58my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
8a80e15e 59
840f08a4 60for (qw(configure build test runtime)) {
61 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
62 next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_}
63 or exists $WriteMakefileArgs{$key};
64 my $r = $WriteMakefileArgs{$key} = {
65 %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}},
66 %{delete $WriteMakefileArgs{$key} || {}},
67 };
68 defined $r->{$_} or delete $r->{$_} for keys %$r;
69}
70
71# dynamic prereqs get added here.
72
73$WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0;
74
75$WriteMakefileArgs{BUILD_REQUIRES} = {
76 %{$WriteMakefileArgs{BUILD_REQUIRES} || {}},
77 %{delete $WriteMakefileArgs{TEST_REQUIRES}}
78} if $eumm_version < 6.63_03;
79
80$WriteMakefileArgs{PREREQ_PM} = {
81 %{$WriteMakefileArgs{PREREQ_PM}},
82 %{delete $WriteMakefileArgs{BUILD_REQUIRES}}
83} if $eumm_version < 6.55_01;
84
85delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
86 if $eumm_version < 6.51_03;
87
88delete $WriteMakefileArgs{MIN_PERL_VERSION}
89 if $eumm_version < 6.48;
90
91delete @WriteMakefileArgs{qw(META_ADD META_MERGE)}
92 if $eumm_version < 6.46;
93
94delete $WriteMakefileArgs{LICENSE}
95 if $eumm_version < 6.31;
96
97WriteMakefile(%WriteMakefileArgs);
ffb3eec6 98