-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.PL
121 lines (112 loc) · 3.67 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
116
117
118
119
120
121
#!/usr/bin/env perl
use strict;
use warnings;
use ExtUtils::MakeMaker;
my @dirs;
if(defined($ENV{'GITHUB_ACTION'}) || defined($ENV{'CIRCLECI'}) || defined($ENV{'TRAVIS_PERL_VERSION'}) || defined($ENV{'APPVEYOR'})) {
# Prevent downloading and installing stuff
warn 'AUTOMATED_TESTING added for you' if(!defined($ENV{'AUTOMATED_TESTING'}));
$ENV{'AUTOMATED_TESTING'} = 1;
$ENV{'NO_NETWORK_TESTING'} = 1;
} elsif(!$ENV{'NO_NETWORK_TESTING'}) {
push @dirs, 'lib/Genealogy/ObituaryDailyTimes/data';
}
# FIXME: AUTOMATED_TESTING - create the empty directory in blib
foreach my $dir(@dirs) {
if(! -d $dir) {
print "Creating the download directory $dir\n";
mkdir $dir, 0755 || die "$dir: $@";
if($ENV{'AUTOMATED_TESTING'}) {
# So that the directory is copied to blib for testing
open(my $dummy, '>', "$dir/dummy");
}
}
}
my $prereqs = {
'autodie' => 0,
'constant' => 0,
'Carp' => 0,
'Database::Abstraction' => 0.04,
'DBD::SQLite' => 0,
'DBD::SQLite::Constants' => 0,
'Error::Simple' => 0,
'ExtUtils::MakeMaker' => 6.64, # Minimum version for TEST_REQUIRES
'File::Basename' => 0,
'File::pfopen' => 0,
'File::Slurp' => 0,
'File::Spec' => 0,
'File::Temp' => 0,
'Module::Info' => 0,
'Scalar::Util' => 0,
'Text::CSV' => 0
};
unless(defined($ENV{'NO_NETWORK_TESTING'})) {
$prereqs->{'DBI'} = 0;
$prereqs->{'File::HomeDir'} = 0;
$prereqs->{'HTML::Entities'} = 0;
$prereqs->{'HTTP::Cache::Transparent'} = 0;
$prereqs->{'LWP::ConnCache'} = 0;
$prereqs->{'LWP::Protocol::https'} = 0;
$prereqs->{'LWP::UserAgent::WithCache'} = 0;
$prereqs->{'Lingua::EN::NameCase'} = 0;
$prereqs->{'Try::Tiny'} = 0;
}
my $dist = {
COMPRESS => 'gzip -9f',
SUFFIX => 'gz'
};
if($^O eq 'darwin') {
$dist->{'TAR'} = 'gtar';
}
WriteMakefile(
NAME => 'Genealogy::ObituaryDailyTimes',
AUTHOR => q{Nigel Horne <njh@bandsman.co.uk>},
VERSION_FROM => 'lib/Genealogy/ObituaryDailyTimes.pm', # finds $VERSION in the module
ABSTRACT_FROM => 'lib/Genealogy/ObituaryDailyTimes.pm',
((defined($ExtUtils::MakeMaker::VERSION) &&
($ExtUtils::MakeMaker::VERSION >= 6.3002))
? ('LICENSE'=> 'GPL')
: ()),
'LIBS' => [''], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
'INC' => '', # e.g., '-I/usr/include/other'
PL_FILES => (defined($ENV{'AUTOMATED_TESTING'}) ? {} : {'bin/create_db.PL' => 'bin/create_db'}),
TEST_REQUIRES => {
'Test::Carp' => 0,
'Test::DescribeMe' => 0,
'Test::Most' => 0,
'Test::NoWarnings' => 0,
'Test::Needs' => 0,
'Test::HTTPStatus' => 0,
# 'Test::Kwalitee' => 0,
'IPC::System::Simple' => 0,
}, PREREQ_PM => $prereqs,
dist => $dist,
clean => { FILES => 'Genealogy-ObituaryDailyTimes-*' },
realclean => {
FILES => 'Genealogy-ObituaryDailyTimes-* lib/Genealogy/ObituaryDailyTimes/data'
},
# META_ADD => {
# provides => {}
# },
META_MERGE => { # https://perldoc.perl.org/CPAN::Meta::Spec
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => 'git://github.com/nigelhorne/Genealogy-ObituaryDailyTimes.git',
web => 'https://github.com/nigelhorne/Genealogy-ObituaryDailyTimes',
repository => 'https://github.com/nigelhorne/Genealogy-ObituaryDailyTimes',
},
bugtracker => {
# web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Genealogy-ObituaryDailyTimes',
# mailto => 'bug-Genealogy-ObituaryDailyTimes@rt.cpan.org'
web => 'https://github.com/nigelhorne/Genealogy-ObituaryDailyTimes/issues',
mailto => 'bug-Genealogy-ObituaryDailyTimes@rt.cpan.org'
}, homepage => 'https://sites.rootsweb.com/~obituary',
},
},
# PPM_INSTALL_EXEC => 'perl',
# PPM_INSTALL_SCRIPT => 'bin/create_db.PL',
MIN_PERL_VERSION => '5.6.2' # Probably would work, but never tested on earlier versions than this
);