forked from ynniv/vagrant-opengenera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (32 loc) · 1.38 KB
/
Makefile
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
# you probably want to download "ubuntu-8.04.4-server-amd64.box" and run "make install"
all: ubuntu-8.04.4-server-amd64 opengenera2.tar.bz2
clean:
vagrant destroy
rm -f ubuntu-8.04.4-server-amd64.box
# vagrant is a tool for automating virtualbox
vagrant:
if test -z $$(which vagrant) ; then \
echo "### need to install vagrant"; \
sudo gem install vagrant; \
fi
# veewee is a vagrant addon that stages base operating system images
veewee: vagrant
if test -z $$(bash -c "vagrant basebox" 2>&1 | grep Tasks) ; then \
echo "### need to install veewee"; \
sudo gem install veewee; \
fi
# veewee might download an OS image. don't let make auto delete it, it's big!
.PRECIOUS: %.iso
# this is the base box we will build on. you should just download it if possible
ubuntu-11.10-server-amd64.box: veewee
echo "### need to build ubuntu-8.04.4-server-amd64.box"
vagrant basebox define ubuntu-8.04.4-server-amd64 ubuntu-8.04.4-server-amd64;
vagrant basebox build ubuntu-8.04.4-server-amd64;
vagrant basebox validate ubuntu-8.04.4-server-amd64;
vagrant basebox export ubuntu-8.04.4-server-amd64;
# test that the base box is installed. make it if not.
ubuntu-8.04.4-server-amd64: vagrant
if test -z $$(vagrant box list | grep -w ubuntu-8.04.4-server-amd64) ; then \
make ubuntu-8.04.4-server-amd64.box; \
vagrant box add ubuntu-8.04.4-server-amd64 ubuntu-8.04.4-server-amd64.box; \
fi