1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 17:00:12 +01:00
fdroidserver/buildserver/cookbooks/android-ndk/recipes/default.rb
Daniel Martí 70d77a1cce Set up SDK and NDK env vars from python
No need to make the buildserver do it
2014-07-01 21:03:50 +02:00

31 lines
712 B
Ruby

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
timeout 14400
interpreter "bash"
user node[:settings][:user]
cwd "/tmp"
code "
if [ `uname -m` == 'x86_64' ] ; then
SUFFIX='_64'
else
SUFFIX=''
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}
"
not_if do
File.exists?("#{ndk_loc}")
end
end