forked from GrantStreetGroup/Email-SendGrid-V3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.PL
115 lines (103 loc) · 3.98 KB
/
Makefile.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
use v5.10.1;
use strict;
use warnings FATAL => 'all';
use ExtUtils::MakeMaker;
my $module_name = 'Email::SendGrid::V3';
my $module_file = 'lib/Email/SendGrid/V3.pm';
my $dist_name = 'Email-SendGrid-V3';
# Standard boilerplate WriteMakefile args
my %WriteMakefileArgs = (
NAME => $module_name,
DISTNAME => $dist_name,
VERSION_FROM => $module_file,
ABSTRACT_FROM => $module_file,
AUTHOR => 'Grant Street Group <developers@grantstreet.com>',
LICENSE => 'artistic_2',
MIN_PERL_VERSION => '5.10.1',
# Use a sane version of EUMM that supports *_REQUIRES
CONFIGURE_REQUIRES => { 'ExtUtils::MakeMaker' => '6.64' },
META_MERGE => {
# Tells EUMM these properties are for CPAN::Meta::Spec v2
'meta-spec' => { version => 2 },
# GitHub links
resources => {
bugtracker => {
web => "https://github.com/GrantStreetGroup/$dist_name/issues",
},
homepage => "https://github.com/GrantStreetGroup/$dist_name",
repository => {
type => 'git',
url => "https://github.com/GrantStreetGroup/$dist_name.git",
web => "https://github.com/GrantStreetGroup/$dist_name",
}
},
x_authority => 'cpan:GSG',
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz' },
clean => { FILES => "$dist_name-*" },
test => { TESTS => 't/*.t' },
);
# Per-dist customizations
%WriteMakefileArgs = (
%WriteMakefileArgs,
PREREQ_PM => {
'Carp' => 0,
'HTTP::Tiny' => 0,
'JSON' => 0,
'constant' => 0,
'namespace::clean' => 0,
},
TEST_REQUIRES => {
'Test2::Bundle::More' => 0,
#'Test2::Tools::Compare' => 0,
'Test2::Tools::Exception' => 0,
#'Test2::Tools::Explain' => 0,
#'Scalar::Util' => 0,
},
);
# Other prereqs not in *_REQUIRES (https://metacpan.org/pod/CPAN::Meta::Spec#Prereq-Spec)
$WriteMakefileArgs{META_MERGE}{prereqs} = {
develop => {
requires => {
'perl' => '5.10.1',
'Module::Metadata' => '1.00', # sane minimum baseline
'Perl::PrereqScanner' => '1.023', # sane minimum baseline
'Pod::Markdown::Github' => 0,
'Pod::Readme' => 'v1.1.2', # sane minimum baseline
'Test2::Suite' => 0,
'Test::CPAN::Changes' => 0,
'Test::Pod' => '1.51', # sane minimum baseline
'Test::Pod::Coverage' => '1.10', # sane minimum baseline
'Test::Strict' => 0,
'Test::Version' => '2.00', # sane minimum baseline
},
},
};
WriteMakefile(%WriteMakefileArgs);
# Custom Makefile additions
package MY;
sub postamble {
my $self = shift;
return join("\n",
'# The first line works around https://github.com/naturalist/pod-markdown-github/issues/7',
'devdeps :',
"\t".'cpanm --notest Pod::Markdown::Github',
"\t".'cpanm --with-develop --installdeps .',
'',
'readme :',
"\t".'$(PERLRUN) -MPod::Readme -e "Pod::Readme->new( input_file => \'$(VERSION_FROM)\', translate_to_file => \'README\', translation_class => \'Pod::Simple::Text\' )->run"',
"\t".'$(PERLRUN) -MPod::Readme -e "Pod::Readme->new( input_file => \'$(VERSION_FROM)\', translate_to_file => \'README.md\', translation_class => \'Pod::Markdown::Github\' )->run"',
'',
'prove :',
"\t".'prove -lr t/',
'',
'authorprove :',
"\t".'AUTHOR_TESTING=1 prove -lr t/ xt/',
'',
'authortest :: TEST_FILES += xt/*.t',
'authortest :: FULLPERLRUN := AUTHOR_TESTING=1 $(FULLPERLRUN)',
'authortest :: test',
'',
'predist :: devdeps manifest readme authorprove',
);
}