Commit | Line | Data |
77a3f907 |
1 | use strict; |
2 | use warnings; |
3 | |
5a5a0df4 |
4 | use ExtUtils::MakeMaker; |
5 | |
c3297ae8 |
6 | ExtUtils::MakeMaker->VERSION('7.00') unless -f 'META.yml'; |
7 | (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; |
77a3f907 |
8 | |
9 | my %WriteMakefileArgs = ( |
10 | NAME => 'Catalyst::Plugin::Email', |
11 | VERSION_FROM => 'lib/Catalyst/Plugin/Email.pm', |
77a3f907 |
12 | AUTHOR => 'Sebastian Riedel <sri@cpan.org>', |
13 | LICENSE => 'perl_5', |
14 | MIN_PERL_VERSION => 5.008, # catalyst minimum |
5a5a0df4 |
15 | PREREQ_PM => { |
77a3f907 |
16 | 'Catalyst' => '2.99', |
17 | 'Email::Send' => '0', |
18 | 'Email::MIME' => '0', |
19 | 'Email::MIME::Creator' => '0', |
fc33a233 |
20 | 'Carp' => '0', |
77a3f907 |
21 | }, |
22 | TEST_REQUIRES => { |
fc33a233 |
23 | 'Test::More' => '0', |
5a5a0df4 |
24 | }, |
cf76467b |
25 | |
26 | META_MERGE => { |
27 | 'meta-spec' => { version => 2 }, |
28 | dynamic_config => 0, |
29 | resources => { |
30 | # r/w: catagits@git.shadowcat.co.uk:Catalyst-Plugin-Email |
31 | # r/o: git://git.shadowcat.co.uk:catagits/Catalyst-Plugin-Email |
32 | # web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Plugin-Email.git |
33 | repository => { |
34 | url => 'https://github.com/perl-catalyst/Catalyst-Plugin-Email.git', |
35 | web => 'https://github.com/perl-catalyst/Catalyst-Plugin-Email', |
36 | type => 'git', |
37 | }, |
38 | bugtracker => { |
39 | mailto => 'bug-Catalyst-Plugin-Email@rt.cpan.org', |
40 | web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-Email', |
41 | }, |
42 | x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst', |
43 | x_IRC => 'irc://irc.perl.org/#catalyst', |
44 | }, |
45 | x_deprecated => 1, |
46 | }, |
5a5a0df4 |
47 | ); |
77a3f907 |
48 | |
49 | die 'need to do a merge with CPAN::Meta::Requirements!!' |
c3297ae8 |
50 | if !-f 'META.yml' && exists $WriteMakefileArgs{BUILD_REQUIRES}; |
77a3f907 |
51 | |
52 | if (!eval { ExtUtils::MakeMaker->VERSION('6.6303') }) { |
53 | $WriteMakefileArgs{BUILD_REQUIRES} = $WriteMakefileArgs{TEST_REQUIRES}; |
54 | delete $WriteMakefileArgs{TEST_REQUIRES}; |
55 | } |
56 | |
57 | if (!eval { ExtUtils::MakeMaker->VERSION('6.5501') }) { |
58 | @{$WriteMakefileArgs{PREREQ_PM}}{ keys %{$WriteMakefileArgs{BUILD_REQUIRES}} } = |
59 | @{$WriteMakefileArgs{BUILD_REQUIRES}}{ keys %{$WriteMakefileArgs{BUILD_REQUIRES}} }; |
60 | |
61 | delete $WriteMakefileArgs{BUILD_REQUIRES}; |
62 | } |
63 | |
64 | my %mm_req = ( |
65 | LICENCE => 6.31, |
66 | META_MERGE => 6.45, |
67 | META_ADD => 6.45, |
68 | MIN_PERL_VERSION => 6.48, |
69 | ); |
70 | for (keys %mm_req) { |
71 | unless (eval { ExtUtils::MakeMaker->VERSION($mm_req{$_}) }) { |
c3297ae8 |
72 | warn "$_ $@" if not -f 'Makefile.PL'; |
77a3f907 |
73 | delete $WriteMakefileArgs{$_}; |
74 | } |
75 | } |
76 | |
77 | WriteMakefile(%WriteMakefileArgs); |