forked from bestpractical/rt-extension-ldapimport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
49 lines (42 loc) · 938 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
42
43
44
45
46
47
48
49
use inc::Module::Install;
RTx('RT-Extension-LDAPImport');
license('perl');
requires('Test::More');
requires('Net::LDAP');
requires('Class::Accessor');
author_tests('xt');
feature "Proper Testing" =>
-default => 0,
recommends('Net::LDAP::Server::Test')
;
my ($lp) = ($INC{'RT.pm'} =~ /^(.*)[\\\/]/);
my $lib_path = join( ' ', "$RT::LocalPath/lib", $lp );
# 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,
PERL => $ENV{PERL} || $secure_perl_path,
},
{
sufix => '.in'
},
qw(bin/rtldapimport),
);
substitute(
{
RT_LIB_PATH => $lib_path,
},
{
sufix => '.in'
},
q(xt/lib/RT/Extension/LDAPImport/Test.pm),
);
sign;
&auto_install();
&WriteAll;