File: Makefile.PL

package info (click to toggle)
nagios-plugins-contrib 21.20170222
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,764 kB
  • ctags: 1,895
  • sloc: perl: 36,233; sh: 11,977; python: 2,435; php: 593; lex: 582; makefile: 456; ansic: 281; ruby: 149; awk: 81
file content (55 lines) | stat: -rw-r--r-- 1,468 bytes parent folder | download | duplicates (8)
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
# 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';
perl_version_from 'check_lm_sensors';
all_from          'check_lm_sensors.pod';

##############################################################################
# Specific dependencies

include 'version';

my %prereqs = (
    'Carp'                          => 0,
    'English'                       => 0,
    'Getopt::Long'                  => 0,
    'List::MoreUtils'               => 0,
    'version'                       => 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';

auto_install;

WriteMakefile(
    PREREQ_PM            => \%prereqs,
    INSTALLSCRIPT        => '/usr/lib/nagios/plugins/contrib',
    INSTALLBIN           => '/usr/lib/nagios/plugins/contrib',
    INSTALLSITESCRIPT    => '/usr/lib/nagios/plugins/contrib',
);