forked from matteocorti/check_updates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.PL
59 lines (47 loc) · 1.43 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
# Load the Module::Install bundled in ./inc/
use inc::Module::Install;
##############################################################################
# Define metadata (we read it from the binary)
name 'check_updates';
version_from 'check_updates';
perl_version_from 'check_updates';
all_from 'check_updates.pod';
##############################################################################
# Specific dependencies
include 'version';
my %prereqs = (
'Carp' => 0,
'English' => 0,
'POSIX' => 0,
'Readonly' => 0,
);
if( eval { require Monitoring::Plugin } ) {
$prereqs{'Monitoring::Plugin'} = 0;
}
else {
$prereqs{'Nagios::Plugin'} = 0;
}
if( eval { require Monitoring::Plugin::Threshold } ) {
$prereqs{'Monitoring::Plugin::Threshold'} = 0;
}
else {
$prereqs{'Nagios::Plugin::Threshold'} = 0;
}
if( eval { require Monitoring::Plugin::Getopt } ) {
$prereqs{'Monitoring::Plugin::Getopt'} = 0;
}
else {
$prereqs{'Nagios::Plugin::Getopt'} = 0;
}
install_script 'check_updates';
auto_install;
tests 't/*.t';
test_requires 'Test::More' => 0;
test_requires 'File::Spec' => 0;
WriteMakefile(
PREREQ_PM => \%prereqs,
INSTALLSCRIPT => '/usr/lib/nagios/plugins/contrib',
INSTALLSITESCRIPT => '/usr/lib/nagios/plugins/contrib',
MAN1PODS => { 'check_updates.pod' => 'blib/man1/check_updates.1', },
MAN3PODS => { },
);