3 # Experimental: use Vagrant & VirtualBox to get a dev environment for Xapian,
4 # with all packages installed and the source bootstrapped and configured.
5 # Takes a long while on a slow connection.
9 echo 'Updating package list.'
11 echo 'Installing required packages (can take a long while the first time).'
12 apt-get -yqq install git build-essential m4 perl python zlib1g-dev uuid-dev wget bison tcl libpcre3-dev libmagic-dev doxygen graphviz ghostscript texlive-latex-base texlive-extra-utils texlive-binaries texlive-fonts-extra texlive-fonts-recommended texlive-latex-extra texlive-latex-recommended help2man python-docutils pngcrush mono-devel openjdk-6-jdk lua5.2 liblua5.2-dev php5-dev php5-cli python-dev ruby-dev tcl-dev eatmydata valgrind
13 echo 'Upgrading existing packages as needed.'
20 if [ ! -d /home/vagrant/build ]; then rm -rf /home/vagrant/build && mkdir /home/vagrant/build; fi
21 if [ ! -d /home/vagrant/install ]; then rm -rf /home/vagrant/install && mkdir /home/vagrant/install; fi
22 cd /home/vagrant/build
28 echo 'Configuring Xapian for build.'
29 cd /home/vagrant/build
30 /vagrant/configure --prefix=/home/vagrant/install
32 echo 'Use `vagrant ssh` to get onto the machine, and `cd build && make`.'
35 Vagrant.configure("2") do |config|
36 config.vm.hostname = "xapian"
37 config.vm.box = "devfort-ubuntu-13.04-provisionerless"
38 config.vm.box_url = "http://devfort.s3.amazonaws.com/boxes/devfort-ubuntu-13.04-provisionerless-virtualbox.box"
40 config.vm.provision "shell", inline: $packages
41 config.vm.provision "shell", inline: $bootstrap, privileged: false
42 config.vm.provision "shell", inline: $configure, privileged: false