honor the DESTDIR environement variable when set
authorMarc Chantreux <marc.chantreux@biblibre.com>
Tue, 25 Aug 2009 23:40:23 +0000 (01:40 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 30 Sep 2009 09:30:07 +0000 (11:30 +0200)
for exemple: when you use
install_misc/environment_Makefile.PL DESTDIR=$HOME by default but koha
is installed in $HOME/koha-dev that is not expected!

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

Makefile.PL

index d0e7460..64e5781 100644 (file)
@@ -850,7 +850,10 @@ be run from the current directory.
 
 Configuration directory:);
         # FIXME - home directory portability consideration apply
-        $install_base_default = (exists $ENV{'HOME'}) ? "$ENV{'HOME'}/koha-dev" : "$defaults->{'INSTALL_BASE'}-dev";
+        $install_base_default = 
+           $ENV{DESTDIR}
+           || ( exists $ENV{HOME} ? "$ENV{HOME}/koha-dev" : "$defaults->{'INSTALL_BASE'}-dev" ) 
+       ;
     } elsif ($config{'INSTALL_MODE'} eq 'single') {
         $msg = "\nPlease specify the directory in which to install Koha";
         # FIXME -- we're assuming under a 'single' mode install