chiark / gitweb /
Fix 'set default java'
[fdroidserver.git] / buildserver / cookbooks / fdroidbuild-general / recipes / default.rb
1
2 user = node[:settings][:user]
3 debian_mirror = node[:settings][:debian_mirror]
4
5 execute 'set_debian_mirror' do
6   command "sed -i 's,http://ftp.uk.debian.org/debian/,#{debian_mirror},g' /etc/apt/sources.list"
7 end
8
9 execute "jessie_backports" do
10   command "echo 'deb http://http.debian.net/debian jessie-backports main' > /etc/apt/sources.list.d/backports.list"
11   only_if "grep jessie /etc/apt/sources.list"
12 end
13
14 execute "apt-get-update" do
15   command "apt-get update"
16 end
17
18 %w{ant ant-contrib autoconf autoconf2.13 automake1.11 autopoint bison bzr cmake curl expect faketime flex gettext git-core git-svn gperf graphviz imagemagick inkscape javacc libarchive-zip-perl liblzma-dev librsvg2-bin libsaxonb-java libssl-dev libssl1.0.0 libtool make maven mercurial nasm openjdk-7-jdk openjdk-8-jdk optipng pandoc perlmagick pkg-config python python-yaml python-gnupg python-magic python-setuptools python3-gnupg quilt realpath scons subversion swig texinfo transfig unzip vorbis-tools xsltproc yasm zip}.each do |pkg|
19   package pkg do
20     action :install
21   end
22 end
23
24 if node['kernel']['machine'] == "x86_64"
25   %w{libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386}.each do |pkg|
26     package pkg do
27       action :install
28     end
29   end
30 end
31
32 easy_install_package "compare-locales" do
33   options "-U"
34   action :install
35 end
36
37 execute "add-bsenv" do
38   user user
39   command "echo \". ./.bsenv \" >> /home/#{user}/.bashrc"
40   not_if "grep bsenv /home/#{user}/.bashrc"
41 end
42
43 execute "set-default-java" do
44   user user
45   command "update-java-alternatives --set java-1.7.0-openjdk-i386"
46 end
47