2012-02-03 17:01:35 +01:00
|
|
|
|
|
|
|
ndk_loc = node[:settings][:ndk_loc]
|
2013-10-10 16:30:11 +02:00
|
|
|
user = node[:settings][:user]
|
|
|
|
|
2015-01-04 04:19:19 +01:00
|
|
|
script "setup-android-ndk" do
|
|
|
|
timeout 14400
|
|
|
|
interpreter "bash"
|
|
|
|
user node[:settings][:user]
|
|
|
|
cwd "/tmp"
|
|
|
|
code "
|
|
|
|
mkdir #{ndk_loc}
|
|
|
|
"
|
|
|
|
not_if do
|
|
|
|
File.exists?("#{ndk_loc}")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-01-03 00:02:54 +01:00
|
|
|
script "setup-android-ndk-r9b" do
|
2013-05-23 11:53:27 +02:00
|
|
|
timeout 14400
|
2012-02-03 17:01:35 +01:00
|
|
|
interpreter "bash"
|
|
|
|
user node[:settings][:user]
|
|
|
|
cwd "/tmp"
|
|
|
|
code "
|
2013-05-31 08:48:39 +02:00
|
|
|
if [ `uname -m` == 'x86_64' ] ; then
|
2013-10-06 13:52:38 +02:00
|
|
|
SUFFIX='_64'
|
2013-05-31 08:48:39 +02:00
|
|
|
else
|
2013-10-06 13:52:38 +02:00
|
|
|
SUFFIX=''
|
2013-05-31 08:48:39 +02:00
|
|
|
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
|
2015-01-03 00:02:54 +01:00
|
|
|
mv android-ndk-r9b #{ndk_loc}/r9b
|
|
|
|
"
|
|
|
|
not_if do
|
|
|
|
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
|
2012-02-03 17:01:35 +01:00
|
|
|
"
|
|
|
|
not_if do
|
2015-01-03 00:02:54 +01:00
|
|
|
File.exists?("#{ndk_loc}/r10d")
|
2012-02-03 17:01:35 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|