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