forked from matteocorti/check_lm_sensors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
51 lines (41 loc) · 1.33 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
# Load the Module::Install bundled in ./inc/
use inc::Module::Install;
##############################################################################
# Define metadata (we read it from the binary)
name 'check_lm_sensors';
version_from 'check_lm_sensors';
all_from 'check_lm_sensors.pod';
##############################################################################
# Specific dependencies
include 'version';
my %prereqs = (
requires 'Carp' => 0,
requires 'English' => 0,
requires 'Getopt::Long' => 0,
requires 'version' => 0,
requires 'JSON::MaybeXS' => 0,
);
if( eval { require Monitoring::Plugin } ) {
$prereqs{'Monitoring::Plugin'} = 0.31;
}
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_lm_sensors';
WriteMakefile(
INSTALLSCRIPT => '/usr/lib/nagios/plugins/contrib',
INSTALLBIN => '/usr/lib/nagios/plugins/contrib',
INSTALLSITESCRIPT => '/usr/lib/nagios/plugins/contrib',
);