X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=Makefile.PL;h=670e8e24b2421115a22dad1121e10e5f041a0ccc;hb=4c9b1e4ada1bfec8ec7287260a23b45673cd3f96;hp=f04a6d4b4fa79fd8f5d1633bd450ebbc0b791f1a;hpb=6fce5692ba7ac591d0c2a671503bc517d08591a9;p=koha.git diff --git a/Makefile.PL b/Makefile.PL index f04a6d4b4f..670e8e24b2 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -547,7 +547,9 @@ WriteMakefile( 'Date::ICal' => 1.72, 'Date::Manip' => 5.44, 'Digest::MD5' => 2.36, + 'Email::Date' => 1.103, 'File::Temp' => 0.16, + 'GD' => 2.39, #optional 'GD::Barcode::UPCE' => 1.1, 'Getopt::Long' => 2.35, 'Getopt::Std' => 1.05, @@ -555,7 +557,6 @@ WriteMakefile( 'HTML::Scrubber' => 0.08, 'HTTP::Cookies' => 1.39, 'HTTP::Request::Common' => 1.26, - 'Image::Magick' => 6.2, # optional 'LWP::Simple' => 1.41, 'LWP::UserAgent' => 2.033, 'Lingua::Stem' => 0.82, @@ -567,7 +568,7 @@ WriteMakefile( 'MARC::File::XML' => 0.88, 'MARC::Record' => 2.00, 'MIME::Base64' => 3.07, - 'MIME::Lite' => 3.01, + 'MIME::Lite' => 3.00, 'MIME::QuotedPrint' => 3.07, 'Mail::Sendmail' => 0.79, 'Net::LDAP' => 0.33, # optional @@ -606,8 +607,9 @@ WriteMakefile( PM => $file_map, # Man pages generated from POD - INSTALLMAN1DIR => File::Spec->catdir($target_directories->{'MAN_DIR'}, 'man1'), - INSTALLMAN3DIR => File::Spec->catdir($target_directories->{'MAN_DIR'}, 'man3'), + # ExtUtils::MakeMaker already manage $(DESTDIR) + INSTALLMAN1DIR => File::Spec->catdir(_strip_destdir($target_directories->{'MAN_DIR'}), 'man1'), + INSTALLMAN3DIR => File::Spec->catdir(_strip_destdir($target_directories->{'MAN_DIR'}), 'man3'), PL_FILES => $pl_files, ); @@ -1273,6 +1275,7 @@ sub get_target_directories { _get_env_overrides(\%dirmap); _get_argv_overrides(\%dirmap); + _add_destdir(\%dirmap); return \%dirmap, \%skipdirs; } @@ -1321,6 +1324,20 @@ sub _get_argv_overrides { @ARGV = @new_argv; } +sub _strip_destdir { + my $dir = shift; + $dir =~ s/^\$\(DESTDIR\)//; + return $dir; +} + +sub _add_destdir { + my $dirmap = shift; + + foreach my $key (keys %$dirmap) { + $dirmap->{$key} = '$(DESTDIR)'.$dirmap->{$key}; + } +} + sub display_configuration { my $config = shift; my $dirmap = shift; @@ -1418,9 +1435,10 @@ install :: all install_koha set_koha_ownership set_koha_permissions warn_koha_en $install .= "\n"; $install .= "set_koha_ownership ::\n"; +# Do not try to change ownership if DESTDIR is set if ($config{'INSTALL_MODE'} eq 'standard' and $config{'KOHA_USER'} ne "root") { foreach my $key (sort keys %$target_directories) { - $install .= "\t\$(NOECHO) chown -R $config{'KOHA_USER'}:$config{'KOHA_GROUP'} \$(KOHA_DEST_$key)\n" + $install .= "\t\$(NOECHO) if test -z \"\$(DESTDIR)\"; then chown -R $config{'KOHA_USER'}:$config{'KOHA_GROUP'} \$(KOHA_DEST_$key); fi\n" unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key}; } } else {