3 #----------------------------------------------------------------------
4 # General configuration
9 # i386 images also work on x86-64, so best to stick with i386.
14 TIMEZONE := US/Eastern
16 BASEREPO := http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/$(ARCH)/os/
18 # Select a suitable HTTP proxy.
19 # The default assumes a local squid proxy.
20 export http_proxy := http://127.0.0.1:3128/
21 export ftp_proxy := http://127.0.0.1:3128/
23 LABEL := $(PACKAGE)-$(VERSION)
25 #----------------------------------------------------------------------
28 @echo "make build Build the live CD ISO"
29 @echo "make boot [HDA=hda.img] [HDB=hdb.img] [ISO=livecd.iso]"
30 @echo " Boot built/named ISO (uses qemu)"
34 build: checkroot livecd.ks
36 livecd-creator --config=livecd.ks --fslabel=$(LABEL)
39 livecd.ks: livecd.ks.in livecd-post.sh Makefile
42 -e 's|@BASEREPO@|$(BASEREPO)|g' \
43 -e 's|@LANG@|$(LANG)|g' \
44 -e 's|@KEYBOARD@|$(KEYBOARD)|g' \
45 -e 's|@TIMEZONE@|$(TIMEZONE)|g' \
46 < $< | cat - livecd-post.sh > $@
48 livecd-post.sh: livecd-post.sh.in p2v.init virt-p2v.sh inittab lvm.conf Makefile
51 -e '/@P2V.INIT@/ r p2v.init' \
53 -e '/@VIRT-P2V.SH@/ r virt-p2v.sh' \
54 -e '/@VIRT-P2V.SH@/ d' \
55 -e '/@INITTAB@/ r inittab' \
57 -e '/@LVM.CONF@/ r lvm.conf' \
61 # Run live CD under qemu.
68 QEMU_ARGS := -m 512 -cdrom $(ISO) -boot d
70 QEMU_ARGS += -hda $(HDA)
73 QEMU_ARGS += -hdb $(HDB)
82 @if [ `id -u` -ne 0 ]; then \
83 echo "You must be root to perform this operation."; \
88 rm -f *~ core livecd.ks livecd-post.sh
93 $(MAKE) check-manifest
94 rm -rf $(PACKAGE)-$(VERSION)
95 mkdir $(PACKAGE)-$(VERSION)
96 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
97 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
98 rm -rf $(PACKAGE)-$(VERSION)
99 ls -l $(PACKAGE)-$(VERSION).tar.gz
102 @for d in `find -type d -name CVS | grep -v '^\./debian/'`; \
105 awk -F/ '$$1 != "D" {print $$2}' $$d/Entries | \
106 sed -e "s|^|$$b|" -e "s|^\./||"; \
107 done | sort > .check-manifest; \
108 sort MANIFEST > .orig-manifest; \
109 diff -u .orig-manifest .check-manifest; rv=$$?; \
110 rm -f .orig-manifest .check-manifest; \
113 .PHONY: build boot checkroot