Skip to content

Commit 76aa1bd

Browse files
committed
Regenerate toolchain
1 parent a7b12be commit 76aa1bd

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

META.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ requires:
3333
resources:
3434
license: http://opensource.org/licenses/gpl-license.php
3535
version: 4.0.0rc2
36-
x_module_install_rtx_version: '0.37'
37-
x_requires_rt: 4.4.1rc2
36+
x_module_install_rtx_version: '0.38'
37+
x_requires_rt: 4.4.1
3838
x_rt_too_new: 4.6.0

inc/Module/Install/RTx.pm

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ no warnings 'once';
88

99
use Module::Install::Base;
1010
use base 'Module::Install::Base';
11-
our $VERSION = '0.37';
11+
our $VERSION = '0.38';
1212

1313
use FindBin;
1414
use File::Glob ();
@@ -37,6 +37,13 @@ sub RTx {
3737
}
3838
$self->add_metadata("x_module_install_rtx_version", $VERSION );
3939

40+
my $installdirs = $ENV{INSTALLDIRS};
41+
for ( @ARGV ) {
42+
if ( /INSTALLDIRS=(.*)/ ) {
43+
$installdirs = $1;
44+
}
45+
}
46+
4047
# Try to find RT.pm
4148
my @prefixes = qw( /opt /usr/local /home /usr /sw /usr/share/request-tracker4);
4249
$ENV{RTHOME} =~ s{/RT\.pm$}{} if defined $ENV{RTHOME};
@@ -71,7 +78,13 @@ sub RTx {
7178

7279
# Installation locations
7380
my %path;
74-
$path{$_} = $RT::LocalPluginPath . "/$name/$_"
81+
my $plugin_path;
82+
if ( $installdirs && $installdirs eq 'vendor' ) {
83+
$plugin_path = $RT::PluginPath;
84+
} else {
85+
$plugin_path = $RT::LocalPluginPath;
86+
}
87+
$path{$_} = $plugin_path . "/$name/$_"
7588
foreach @DIRS;
7689

7790
# Copy RT 4.2.0 static files into NoAuth; insufficient for
@@ -85,7 +98,7 @@ sub RTx {
8598
my %index = map { $_ => 1 } @INDEX_DIRS;
8699
$self->no_index( directory => $_ ) foreach grep !$index{$_}, @DIRS;
87100

88-
my $args = join ', ', map "q($_)", map { ($_, $path{$_}) }
101+
my $args = join ', ', map "q($_)", map { ($_, "\$(DESTDIR)$path{$_}") }
89102
sort keys %path;
90103

91104
printf "%-10s => %s\n", $_, $path{$_} for sort keys %path;
@@ -131,6 +144,7 @@ install ::
131144
if ( $path{lib} ) {
132145
$self->makemaker_args( INSTALLSITELIB => $path{'lib'} );
133146
$self->makemaker_args( INSTALLARCHLIB => $path{'lib'} );
147+
$self->makemaker_args( INSTALLVENDORLIB => $path{'lib'} )
134148
} else {
135149
$self->makemaker_args( PM => { "" => "" }, );
136150
}
@@ -139,6 +153,13 @@ install ::
139153
$self->makemaker_args( INSTALLSITEMAN3DIR => "$RT::LocalPath/man/man3" );
140154
$self->makemaker_args( INSTALLSITEARCH => "$RT::LocalPath/man" );
141155

156+
# INSTALLDIRS=vendor should install manpages into /usr/share/man.
157+
# That is the default path in most distributions. Need input from
158+
# Redhat, Centos etc.
159+
$self->makemaker_args( INSTALLVENDORMAN1DIR => "/usr/share/man/man1" );
160+
$self->makemaker_args( INSTALLVENDORMAN3DIR => "/usr/share/man/man3" );
161+
$self->makemaker_args( INSTALLVENDORARCH => "/usr/share/man" );
162+
142163
if (%has_etc) {
143164
print "For first-time installation, type 'make initdb'.\n";
144165
my $initdb = '';
@@ -258,4 +279,4 @@ sub _load_rt_handle {
258279

259280
__END__
260281
261-
#line 390
282+
#line 428

0 commit comments

Comments
 (0)