Author: Tom Jampen Description: Using the PREFIX environment variable defined in rules to find debian's request tracker installation and fixing the plugin path to install to DESTDIR. diff -Naurp a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm --- a/inc/Module/Install/RTx.pm 2014-10-15 08:41:45.631919231 +0200 +++ b/inc/Module/Install/RTx.pm 2014-10-15 08:41:04.130328032 +0200 @@ -42,12 +42,14 @@ sub RTx { $ENV{RTHOME} =~ s{/RT\.pm$}{} if defined $ENV{RTHOME}; $ENV{RTHOME} =~ s{/lib/?$}{} if defined $ENV{RTHOME}; my @try = $ENV{RTHOME} ? ($ENV{RTHOME}, "$ENV{RTHOME}/lib") : (); + my $prefix = $ENV{PREFIX}; + push @INC, "$prefix/lib"; while (1) { my @look = @INC; unshift @look, grep {defined and -d $_} @try; push @look, grep {defined and -d $_} map { ( "$_/rt4/lib", "$_/lib/rt4", "$_/lib" ) } @prefixes; - last if eval {local @INC = @look; require RT; $RT::LocalLibPath}; + last if eval {local @INC = @look; require RT; $RT::LocalPluginPath = '$(DESTDIR)'."$prefix/plugins"; $RT::LocalLibPath}; warn "Cannot find the location of RT.pm that defines \$RT::LocalPath in: @look\n";