Update.
[virt-p2v.git] / Makefile
1 # $Id$
2
3 #----------------------------------------------------------------------
4 # General configuration
5
6 VERSION  := 0.1
7
8 # i386 images also work on x86-64, so best to stick with i386.
9 ARCH     := i386
10
11 LANG     := en_US.UTF-8
12 KEYBOARD := us
13 TIMEZONE := US/Eastern
14
15 BASEREPO := http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/$(ARCH)/os/
16
17 # Select a suitable HTTP proxy.
18 # The default assumes a local squid proxy.
19 export http_proxy := http://127.0.0.1:3128/
20 export ftp_proxy := http://127.0.0.1:3128/
21
22 LABEL    := virt-p2v-$(VERSION)
23
24 #----------------------------------------------------------------------
25
26 all:
27         @echo "make build              Build the live CD ISO"
28         @echo "make boot [ISO=foo.iso] Boot built/named ISO (uses qemu)"
29
30 build: livecd-test.ks
31         rm -f $(LABEL).iso
32         livecd-creator \
33           --config=$< \
34           --fslabel=$(LABEL)
35         ls -lhtr *.iso
36
37 ISO     = $(LABEL).iso
38
39 boot:
40         qemu -m 512 -cdrom $(ISO)
41
42 livecd-test.ks: livecd-test.ks.in livecd-post.sh Makefile
43         sed \
44           -e 's|@BASEREPO@|$(BASEREPO)|g' \
45           -e 's|@LANG@|$(LANG)|g' \
46           -e 's|@KEYBOARD@|$(KEYBOARD)|g' \
47           -e 's|@TIMEZONE@|$(TIMEZONE)|g' \
48           < $< | cat - livecd-post.sh > $@
49
50 livecd-post.sh: livecd-post.sh.in p2v.init virt-p2v.sh Makefile
51         sed \
52           -e '/@P2V.INIT@/ r p2v.init' \
53           -e '/@P2V.INIT@/ d' \
54           -e '/@VIRT-P2V.SH@/ r virt-p2v.sh' \
55           -e '/@VIRT-P2V.SH@/ d' \
56           < $< > $@