blob: cf54311bdb9648c3858d9819ef6fd25623da7ad7 [file] [log] [blame]
Roger Meier14ff9c82013-05-30 14:11:45 +02001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
Carl Yeksigian1ed79912013-06-03 18:29:31 -04004#
5# Licensed to the Apache Software Foundation (ASF) under one
6# or more contributor license agreements. See the NOTICE file
7# distributed with this work for additional information
8# regarding copyright ownership. The ASF licenses this file
9# to you under the Apache License, Version 2.0 (the
10# "License"); you may not use this file except in compliance
11# with the License. You may obtain a copy of the License at
12#
13# http://www.apache.org/licenses/LICENSE-2.0
14#
15# Unless required by applicable law or agreed to in writing,
16# software distributed under the License is distributed on an
17# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18# KIND, either express or implied. See the License for the
19# specific language governing permissions and limitations
20# under the License.
21#
22
Roger Meier14ff9c82013-05-30 14:11:45 +020023$script = <<SCRIPT
24echo I am provisioning for Apache Thrift ...
25sudo apt-get update -qq -y
26sudo apt-get upgrade -qq -y
27sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev make libqt4-dev
28sudo apt-get install -qq ant openjdk-7-jdk
29sudo apt-get install -qq python-all python-all-dev python-all-dbg
30sudo apt-get install -qq libbit-vector-perl
31sudo apt-get install -qq php5-dev php5-cli phpunit
32sudo apt-get install -qq libglib2.0-dev
33sudo apt-get install -qq git erlang-base erlang-eunit erlang-dev
34sudo apt-get install -qq mono-gmcs mono-devel libmono-system-web2.0-cil
35#sudo apt-get install -qq ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev
36sudo apt-get install -qq mingw32 mingw32-binutils mingw32-runtime
37echo I am building Apache Thrift ...
Carl Yeksigian1ed79912013-06-03 18:29:31 -040038cd /thrift
Roger Meier14ff9c82013-05-30 14:11:45 +020039sh bootstrap.sh
jfarrell69b02aa2013-06-20 15:40:48 -050040sh configure --without-erlang
Roger Meier14ff9c82013-05-30 14:11:45 +020041make
42make dist
43make check
44#sh test/test.sh
45date > /etc/vagrant_provisioned_at
46SCRIPT
47
48Vagrant.configure("2") do |config|
49 # Ubuntu 12.04 LTS (Precise Pangolin)
50 config.vm.box = "precise64"
51 config.vm.box_url = "http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-amd64-disk1.box"
52 # config.vm.box = "precise32"
53 # config.vm.box_url = "http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-i386-disk1.box"
54
Carl Yeksigian1ed79912013-06-03 18:29:31 -040055 config.vm.synced_folder "../", "/thrift"
56
jfarrellb6f23e82013-06-21 13:36:18 -050057 config.vm.provider :virtualbox do |vbox|
58 vbox.customize ["modifyvm", :id, "--memory", "1024"]
59 vbox.customize ["modifyvm", :id, "--cpus", "2"]
60 end
61
Roger Meier14ff9c82013-05-30 14:11:45 +020062 # call the script
63 config.vm.provision :shell, :inline => $script
64end