Vagrantfile improvments, bootstrap ctsim automake system
[ctsim.git] / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
4 # All Vagrant configuration is done below. The "2" in Vagrant.configure
5 # configures the configuration version (we support older styles for
6 # backwards compatibility). Please don't change it unless you know what
7 # you're doing.
8 Vagrant.configure("2") do |config|
9   config.vm.box = "hashicorp/bionic64"
10   config.vm.provider "virtualbox" do |vb|
11     vb.memory = "2048"
12     vb.cpus = "2"
13   end
14
15   config.vm.provision "shell", inline: <<-SHELL
16     FILE=/etc/apt/preferences.d/99do_not_update
17     echo "Package: /(grub-common|grub2-common|grub-pc)/
18 Pin: release *
19 Pin-Priority: -1" > $FILE
20     apt-get update
21     apt-get dist-upgrade -y
22     apt-get install -yy debhelper libfftw3-dev libreadline-dev libgl1-mesa-dev libglu1-mesa-dev libwxgtk3.0-dev ctn-dev libpng-dev 
23     apt-get install -yy git emacs-nox
24     apt-get autoremove -y
25     rm $FILE
26     git clone git://git.kpe.io/ctsim.git ctsim.git
27     echo Bootstrapping ctsim
28     DIR=/home/vagrant/ctsim.git
29     cd $DIR
30     ./bootstrap.sh
31     chown -R vagrant:vagrant $DIR
32     echo "To build ctsim:"
33     echo "  cd ctsim.git; ./configure; make"
34   SHELL
35
36 end