Permalink
Browse files

Fixed DESTDIR.

  • Loading branch information...
1 parent 5aea289 commit d93d457960ca26d9270389bd6802d06c1b626ac7 @brixen brixen committed Sep 24, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 rakelib/install.rake
@@ -13,7 +13,8 @@ task :install => %w[build:build gems:install install:files install:done]
# that path is writable. If not, we require explicit permission.
def need_permission?
FileList["#{BUILD_CONFIG[:stagingdir]}/*"].each do |name|
- dir = File.expand_path(File.join(ENV['DESTDIR'], BUILD_CONFIG[:prefixdir], name))
+ destdir = ENV['DESTDIR'] || ''
+ dir = File.expand_path(File.join(destdir, BUILD_CONFIG[:prefixdir], name))
until dir == "/"
if File.directory? dir
@@ -216,7 +217,8 @@ oppropriate command to elevate permissions (eg su, sudo).
exit(1)
else
stagingdir = BUILD_CONFIG[:stagingdir]
- prefixdir = File.join(ENV['DESTDIR'], BUILD_CONFIG[:prefixdir])
+ destdir = ENV['DESTDIR'] || ''
+ prefixdir = File.join(destdir, BUILD_CONFIG[:prefixdir])
install_capi_include "#{stagingdir}#{BUILD_CONFIG[:include18dir]}",
"#{prefixdir}#{BUILD_CONFIG[:include18dir]}"

0 comments on commit d93d457

Please sign in to comment.