mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 11:00:10 +01:00
efcf850247
* Gradle from 1.7 to 1.8 * Android SDK from 21.0.1 to 22.2.1 * SDK Build Tools from 18.0.1 to 18.1.1 * Added legacy toolchains to NDK r9
37 lines
883 B
Ruby
37 lines
883 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
|
|
|
|
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
|
|
SUFFIX='_64'
|
|
else
|
|
SUFFIX=''
|
|
fi
|
|
tar jxvf /vagrant/cache/android-ndk-r9-linux-x86$SUFFIX.tar.bz2
|
|
tar jxvf /vagrant/cache/android-ndk-r9-linux-x86$SUFFIX-legacy-toolchains.tar.bz2
|
|
mv android-ndk-r9 #{ndk_loc}
|
|
"
|
|
not_if do
|
|
File.exists?("#{ndk_loc}")
|
|
end
|
|
end
|
|
|