1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00
fdroidserver/buildserver/cookbooks/android-ndk/recipes/default.rb

37 lines
886 B
Ruby
Raw Normal View History

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
execute "add-android-ndk-var" do
user user
command "echo \"export ANDROID_NDK=#{ndk_loc}\" >> /home/#{user}/.bsenv"
not_if "grep ANDROID_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
2013-10-06 13:52:38 +02:00
SUFFIX='_64'
else
2013-10-06 13:52:38 +02:00
SUFFIX=''
fi
2013-12-16 12:42:33 +01:00
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