chiark / gitweb /
docs: Add information on binary verification
[fdroidserver.git] / buildserver / cookbooks / android-ndk / recipes / default.rb
1
2 ndk_loc = node[:settings][:ndk_loc]
3 user = node[:settings][:user]
4
5 script "setup-android-ndk" do
6   timeout 14400
7   interpreter "bash"
8   user node[:settings][:user]
9   cwd "/tmp"
10   code "
11     mkdir #{ndk_loc}
12   "
13   not_if do
14     File.exists?("#{ndk_loc}")
15   end
16 end
17
18 script "setup-android-ndk-r9b" do
19   timeout 14400
20   interpreter "bash"
21   user node[:settings][:user]
22   cwd "/tmp"
23   code "
24     if [ `uname -m` == 'x86_64' ] ; then
25        SUFFIX='_64'
26     else
27        SUFFIX=''
28     fi
29     tar jxvf /vagrant/cache/android-ndk-r9b-linux-x86$SUFFIX.tar.bz2
30     tar jxvf /vagrant/cache/android-ndk-r9b-linux-x86$SUFFIX-legacy-toolchains.tar.bz2
31     mv android-ndk-r9b #{ndk_loc}/r9b
32   "
33   not_if do
34     File.exists?("#{ndk_loc}/r9b")
35   end
36 end
37
38 script "setup-android-ndk-r10e" do
39   timeout 14400
40   interpreter "bash"
41   user node[:settings][:user]
42   cwd "/tmp"
43   code "
44     if [ `uname -m` == 'x86_64' ] ; then
45        SUFFIX='_64'
46     else
47        SUFFIX=''
48     fi
49     chmod u+x /vagrant/cache/android-ndk-r10e-linux-x86$SUFFIX.bin
50     /vagrant/cache/android-ndk-r10e-linux-x86$SUFFIX.bin x
51     mv android-ndk-r10e #{ndk_loc}/r10e
52   "
53   not_if do
54     File.exists?("#{ndk_loc}/r10e")
55   end
56 end
57