-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.PL
41 lines (33 loc) · 1004 Bytes
/
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
use inc::Module::Install;
RTx 'RT-Action-NotifyPagerDuty';
license 'gpl_2';
repository 'https://github.com/catalyst-cloud/RT-Extension-PagerDuty';
readme_from 'lib/RT/Action/NotifyPagerDuty.pm';
install_script 'bin/rt-flush-pagerduty';
requires 'Agent::PagerDuty' => '0.03';
requires_rt '4.4.0';
my ($lp) = ($INC{'RT.pm'} =~ /^(.*)[\\\/]/);
my $lib_path = join( ' ', "$RT::LocalPath/lib", $lp );
my $bin_path = $RT::BinPath || "$RT::BasePath/bin"
|| '/opt/rt5/bin' || '/opt/rt4/bin';
# Straight from perldoc perlvar
use Config;
my $secure_perl_path = $Config{perlpath};
if ($^O ne 'VMS') {
$secure_perl_path .= $Config{_exe}
unless $secure_perl_path =~ m/$Config{_exe}$/i;
}
substitute(
{
RT_LIB_PATH => $lib_path,
RT_BIN_PATH => $bin_path,
PERL => $ENV{PERL} || $secure_perl_path,
},
{
sufix => '.in'
},
qw(bin/rt-flush-pagerduty),
);
install_script 'bin/rt-flush-pagerduty';
sign;
WriteAll;