# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.box = "utopic"

  config.vm.provider "virtualbox" do |vb|
    vb.memory = 2048
    vb.cpus = 2
  end
  config.ssh.forward_x11 = true
  config.vbguest.auto_update = false

  config.vm.provision "shell", inline: <<-SHELL
    sudo apt-get update
    sudo apt-get install -y git build-essential gdb valgrind htop
    sudo apt-get install -y libcairo2-dev #libgtk2.0-dev libgtk2.0-0
    sudo apt-get install -y libpango1.0-dev texlive texlive-latex-extra
    sudo apt-get install -y ccache hmmer ncbi-blast+ blast2 texlive
    sudo apt-get install -y libc6-i386 lib32stdc++ lib32z1 asciidoc
    cd /home/vagrant && mkdir -p arm && cd arm
    git clone --depth 1 https://github.com/raspberrypi/tools.git
    cd /home/vagrant
    chown -R vagrant:vagrant arm
    wget -qO - 'http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x730943C4D0611AA0' | apt-key add -
    sudo apt-add-repository "deb http://ppa.launchpad.net/flosoft/cross-apple/ubuntu precise main"
    sudo apt-get update
    sudo apt-get --allow-unauthenticated install -y apple-x86-gcc gcc-arm-linux-gnueabihf
    git config --global user.name "Sascha Steinbiss"
    git config --global user.email "sascha@steinbiss.name"
  SHELL
end
