Add NDK r10d, this time alongside r9b

Specified per-build with ndk=<version> defaulting to the oldest, r9b.
This commit is contained in:
Daniel Martí 2015-01-03 00:02:54 +01:00
parent 43092407a3
commit f60f1bc59e
9 changed files with 130 additions and 64 deletions

View file

@ -2,13 +2,7 @@
ndk_loc = node[:settings][:ndk_loc]
user = node[:settings][:user]
execute "add-android-ndk-path" do
user user
command "echo \"export PATH=\\$PATH:#{ndk_loc} #PATH-NDK\" >> /home/#{user}/.bsenv"
not_if "grep PATH-NDK /home/#{user}/.bsenv"
end
script "setup-android-ndk" do
script "setup-android-ndk-r9b" do
timeout 14400
interpreter "bash"
user node[:settings][:user]
@ -21,10 +15,29 @@ script "setup-android-ndk" do
fi
tar jxvf /vagrant/cache/android-ndk-r9b-linux-x86$SUFFIX.tar.bz2
tar jxvf /vagrant/cache/android-ndk-r9b-linux-x86$SUFFIX-legacy-toolchains.tar.bz2
mv android-ndk-r9b #{ndk_loc}
mv android-ndk-r9b #{ndk_loc}/r9b
"
not_if do
File.exists?("#{ndk_loc}")
File.exists?("#{ndk_loc}/r9b")
end
end
script "setup-android-ndk-r10d" do
timeout 14400
interpreter "bash"
user node[:settings][:user]
cwd "/tmp"
code "
if [ `uname -m` == 'x86_64' ] ; then
SUFFIX='_64'
else
SUFFIX=''
fi
/vagrant/cache/android-ndk-r10d-linux-x86$SUFFIX.bin x
mv android-ndk-r10d #{ndk_loc}/r10d
"
not_if do
File.exists?("#{ndk_loc}/r10d")
end
end