chiark / gitweb /
Merge branch 'gradle' (finally!)
[fdroidserver.git] / buildserver / cookbooks / fdroidbuild-general / recipes / default.rb
1
2 %w{ant ant-contrib autoconf autopoint bison cmake expect libtool libssl1.0.0 libssl-dev maven openjdk-7-jdk javacc python git-core mercurial subversion bzr git-svn make perlmagick pkg-config zip ruby rubygems librmagick-ruby yasm imagemagick}.each do |pkg|
3   package pkg do
4     action :install
5   end
6 end
7
8 if node['kernel']['machine'] == "x86_64"
9   %w{libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386}.each do |pkg|
10     package pkg do
11       action :install
12     end
13   end
14 end
15
16 script "install-gradle" do
17   cwd "/tmp"
18   interpreter "bash"
19   code "
20     unzip /vagrant/cache/gradle-1.7-bin.zip
21     mv gradle-1.7 /opt/gradle
22   "
23   not_if "test -d /opt/gradle"
24 end
25
26 execute "add-gradle-home" do
27   user user
28   command "echo \"export GRADLE_HOME=/opt/gradle\" >> /home/#{user}/.bashrc"
29   not_if "grep GRADLE_HOME /home/#{user}/.bashrc"
30 end
31 execute "add-gradle-bin" do
32   user user
33   command "echo \"export PATH=$PATH:/opt/gradle/bin\" >> /home/#{user}/.bashrc"
34   not_if "grep gradle/bin /home/#{user}/.bashrc"
35 end
36
37