forked from bestpractical/rtir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
71 lines (55 loc) · 1.78 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
use inc::Module::Install;
RTx('RT-IR', { no_readme_generation => 1 });
license('GPL Version 2');
author('Best Practical Solutions <[email protected]>');
all_from('lib/RT/IR.pm');
# update README and docs/UPGRADING
requires_rt('4.0.14');
rt_too_new('4.2.0',"\nRTIR 3.0.x is only compatible with RT 4.0.x and you are using RT %s\n");
# XXX: This should be reported by M::I::RTx
my ($lib_path) = $INC{'RT.pm'} =~ /^(.*)[\\\/]/;
my $local_lib_path = "$RT::LocalPath/lib";
unshift @INC, $local_lib_path, $lib_path;
# 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;
}
# RTIR needs this version of SB because of cud-from-select
requires('DBIx::SearchBuilder', 1.61);
# IP searching
requires('Hook::LexWrap');
requires('Regexp::Common');
# queries parsing
requires('Parse::BooleanLogic');
# for tests
build_requires('Test::More');
build_requires('File::Find');
# for etc/upgrade/upgrade.pl
build_requires('File::Temp');
auto_install();
substitute( {
RT_LIB_PATH => join( ' ', $local_lib_path, $lib_path ),
PERL => $ENV{PERL} || $secure_perl_path,
},
{ sufix => '.in' },
'etc/upgrade/upgrade.pl',
'etc/add_constituency',
'lib/RT/IR/Test.pm',
'etc/upgrade/2.5.1/update_saved_searches.pl',
);
tests("t/*.t t/*/*.t");
postamble(<<POSTAMBLE
snapshot: dist sign-dist dist-shasums
sign-dist:
gpg -a --detach-sign \$(DISTVNAME).tar.gz
dist-shasums:
sha1sum \$(DISTVNAME).tar.gz*
parallel-test: test-parallel
test-parallel:
RT_TEST_PARALLEL=1 \$(FULLPERLRUN) "-MApp::Prove" -e 'my \$\$p = App::Prove->new(); \$\$p->process_args("-wlrj5","--state=slow,save", "t"); exit( \$\$p->run() ? 0 : 1 )'
POSTAMBLE
);
WriteAll();