From 01c5aed1dde13ace8c5e869736d9b209d3f91020 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 6 May 2014 20:22:30 -0400 Subject: [PATCH] Add vagrant config --- Vagrantfile | 10 ++++++++++ scripts/bootstrap-ubuntu.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Vagrantfile create mode 100755 scripts/bootstrap-ubuntu.sh diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 000000000..143be128b --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,10 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = "lucid32" +# config.vm.provision :shell, :path => "scripts/bootstrap-ubuntu.sh" +end diff --git a/scripts/bootstrap-ubuntu.sh b/scripts/bootstrap-ubuntu.sh new file mode 100755 index 000000000..dca22421c --- /dev/null +++ b/scripts/bootstrap-ubuntu.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# Set up build environment on Ubuntu. + +set -e + +sudo apt-get update + +# Install build tools. +sudo apt-get install -y git-core gcc g++ gfortran \ + ccache make buildbot default-jdk unixodbc-dev + +# Install CMake. +CMAKE=cmake-2.8.12.2-Linux-i386 +wget http://www.cmake.org/files/v2.8/$CMAKE.tar.gz +tar xzf $CMAKE.tar.gz +sudo rm -rf /opt/$CMAKE +sudo mv $CMAKE /opt +sudo ln -sf /opt/$CMAKE/bin/cmake /usr/local/bin + +# Set up ccache links. +sudo ln -sf /usr/bin/ccache /usr/local/bin/gcc +sudo ln -sf /usr/bin/ccache /usr/local/bin/cc +sudo ln -sf /usr/bin/ccache /usr/local/bin/g++ +sudo ln -sf /usr/bin/ccache /usr/local/bin/c++ + +# Install f90cache. +rm -rf f90cache +git clone https://github.com/vitaut/f90cache.git +cd f90cache +./configure +make +sudo make install +cd .. +rm -rf f90cache +cd /usr/local/bin +sudo ln -sf f90cache gfortran-4.4