blob: 9a0ba94c0e9222c75dff6219c6228319d44b0855 [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
jfarrell9753cde2013-06-21 14:53:39 -050031sudo apt-get install -qq php5-dev php5-cli
Roger Meier14ff9c82013-05-30 14:11:45 +020032sudo 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
jfarrell9753cde2013-06-21 14:53:39 -050037
38# PHPUnit package broken in ubuntu. see https://bugs.launchpad.net/ubuntu/+source/phpunit/+bug/701544
39sudo apt-get upgrade pear
40sudo pear channel-discover pear.phpunit.de
41sudo pear channel-discover pear.symfony.com
42sudo pear channel-discover components.ez.no
43sudo pear update-channels
44sudo pear upgrade-all
45sudo pear install --alldeps phpunit/PHPUnit
46
Roger Meier14ff9c82013-05-30 14:11:45 +020047echo I am building Apache Thrift ...
Carl Yeksigian1ed79912013-06-03 18:29:31 -040048cd /thrift
Roger Meier14ff9c82013-05-30 14:11:45 +020049sh bootstrap.sh
jfarrell69b02aa2013-06-20 15:40:48 -050050sh configure --without-erlang
Roger Meier14ff9c82013-05-30 14:11:45 +020051make
52make dist
53make check
54#sh test/test.sh
55date > /etc/vagrant_provisioned_at
56SCRIPT
57
58Vagrant.configure("2") do |config|
59 # Ubuntu 12.04 LTS (Precise Pangolin)
60 config.vm.box = "precise64"
61 config.vm.box_url = "http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-amd64-disk1.box"
62 # config.vm.box = "precise32"
63 # config.vm.box_url = "http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-i386-disk1.box"
64
Carl Yeksigian1ed79912013-06-03 18:29:31 -040065 config.vm.synced_folder "../", "/thrift"
66
jfarrellb6f23e82013-06-21 13:36:18 -050067 config.vm.provider :virtualbox do |vbox|
68 vbox.customize ["modifyvm", :id, "--memory", "1024"]
69 vbox.customize ["modifyvm", :id, "--cpus", "2"]
70 end
71
Roger Meier14ff9c82013-05-30 14:11:45 +020072 # call the script
73 config.vm.provision :shell, :inline => $script
74end