-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile.PL
56 lines (44 loc) · 1.59 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
# Load the Module::Install bundled in ./inc/
use lib '.'; # added since from Perl 5.26 '.' is no more in @INC
use inc::Module::Install;
use strict;
use warnings;
##############################################################################
# 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 'Module::AutoInstall';
include 'version';
my %prereqs = (
'Carp' => 0,
'English' => 0,
'POSIX' => 0,
'Readonly' => 0,
'Monitoring::Plugin' => 0,
'Monitoring::Plugin::Threshold' => 0,
'Monitoring::Plugin::Getopt' => 0,
);
install_script 'check_updates';
auto_install;
tests 't/*.t';
test_requires 'Test::More' => 0;
test_requires 'File::Spec' => 0;
# https://metacpan.org/pod/release/DAGOLDEN/CPAN-Meta-2.142690/lib/CPAN/Meta/Spec.pm#license
license 'gpl_3';
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 => { },
);
sub MY::postamble {
my $dest_path = "/usr/share/bash-completion/completions/";
my $script_name = "check_updates.completion";
my $str = "install::\n\t\$(CP) ${script_name} ${dest_path}/check_updates\n";
return &Module::AutoInstall::postamble . $str;
}