forked from xapian/xapian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
43 lines (38 loc) · 1.79 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- mode: ruby -*-
#
# Experimental: use Vagrant & VirtualBox to get a dev environment for Xapian,
# with all packages installed and the source bootstrapped and configured.
# Takes a long while on a slow connection.
$packages = <<END
set -e
echo 'Updating package list.'
apt-get -qq update
echo 'Installing required packages (can take a long while the first time).'
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
echo 'Upgrading existing packages as needed.'
apt-get -yqq upgrade
END
$bootstrap = <<END
set -e
echo 'Bootstrapping.'
if [ ! -d /home/vagrant/build ]; then rm -rf /home/vagrant/build && mkdir /home/vagrant/build; fi
if [ ! -d /home/vagrant/install ]; then rm -rf /home/vagrant/install && mkdir /home/vagrant/install; fi
cd /home/vagrant/build
/vagrant/bootstrap
END
$configure = <<END
set -e
echo 'Configuring Xapian for build.'
cd /home/vagrant/build
/vagrant/configure --prefix=/home/vagrant/install
echo
echo 'Use `vagrant ssh` to get onto the machine, and `cd build && make`.'
END
Vagrant.configure("2") do |config|
config.vm.hostname = "xapian"
config.vm.box = "devfort-ubuntu-13.04-provisionerless"
config.vm.box_url = "http://devfort.s3.amazonaws.com/boxes/devfort-ubuntu-13.04-provisionerless-virtualbox.box"
config.vm.provision "shell", inline: $packages
config.vm.provision "shell", inline: $bootstrap, privileged: false
config.vm.provision "shell", inline: $configure, privileged: false
end