X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Makefile;h=a5bb4780514a480d86f6110fac97183730da05c7;hb=fe0ff26b9757ac927f13bf97692974be41e07e23;hp=f9622fe08048cc5a635e1aae05ad4ad01bc5fdab;hpb=bb875bd7a3846ac1241b8317db9d9ac0a49e52fa;p=virt-p2v.git diff --git a/Makefile b/Makefile index f9622fe..a5bb478 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,29 @@ +# Makefile for virt-p2v +# +# Copyright (C) 2007 Red Hat Inc. +# Written by Richard W.M. Jones +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# # $Id$ #---------------------------------------------------------------------- # General configuration -VERSION := 0.1 +PACKAGE := virt-p2v +VERSION := 0.4 # i386 images also work on x86-64, so best to stick with i386. ARCH := i386 @@ -19,7 +39,7 @@ BASEREPO := http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora export http_proxy := http://127.0.0.1:3128/ export ftp_proxy := http://127.0.0.1:3128/ -LABEL := virt-p2v-$(VERSION) +LABEL := $(PACKAGE)-$(VERSION) #---------------------------------------------------------------------- @@ -36,6 +56,7 @@ build: checkroot livecd.ks ls -lhtr *.iso livecd.ks: livecd.ks.in livecd-post.sh Makefile + rm -f $@ sed \ -e 's|@BASEREPO@|$(BASEREPO)|g' \ -e 's|@LANG@|$(LANG)|g' \ @@ -43,7 +64,8 @@ livecd.ks: livecd.ks.in livecd-post.sh Makefile -e 's|@TIMEZONE@|$(TIMEZONE)|g' \ < $< | cat - livecd-post.sh > $@ -livecd-post.sh: livecd-post.sh.in p2v.init virt-p2v.sh inittab Makefile +livecd-post.sh: livecd-post.sh.in p2v.init virt-p2v.sh inittab lvm.conf Makefile + rm -f $@ sed \ -e '/@P2V.INIT@/ r p2v.init' \ -e '/@P2V.INIT@/ d' \ @@ -51,6 +73,8 @@ livecd-post.sh: livecd-post.sh.in p2v.init virt-p2v.sh inittab Makefile -e '/@VIRT-P2V.SH@/ d' \ -e '/@INITTAB@/ r inittab' \ -e '/@INITTAB@/ d' \ + -e '/@LVM.CONF@/ r lvm.conf' \ + -e '/@LVM.CONF@/ d' \ < $< > $@ # Run live CD under qemu. @@ -82,4 +106,27 @@ checkroot: clean: rm -f *~ core livecd.ks livecd-post.sh +# Manifest. + +dist: + $(MAKE) check-manifest + rm -rf $(PACKAGE)-$(VERSION) + mkdir $(PACKAGE)-$(VERSION) + tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf - + tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) + rm -rf $(PACKAGE)-$(VERSION) + ls -l $(PACKAGE)-$(VERSION).tar.gz + +check-manifest: + @for d in `find -type d -name CVS | grep -v '^\./debian/'`; \ + do \ + b=`dirname $$d`/; \ + awk -F/ '$$1 != "D" {print $$2}' $$d/Entries | \ + sed -e "s|^|$$b|" -e "s|^\./||"; \ + done | sort > .check-manifest; \ + sort MANIFEST > .orig-manifest; \ + diff -u .orig-manifest .check-manifest; rv=$$?; \ + rm -f .orig-manifest .check-manifest; \ + exit $$rv + .PHONY: build boot checkroot \ No newline at end of file