Ohad Basan has uploaded a new change for review.

Change subject: ovirt-live: replace build.sh with a Makefile
......................................................................

ovirt-live: replace build.sh with a Makefile

Change-Id: Ib83cf9e56b151c7f2b5392d7bfd6ebed2df04ac9
Signed-off-by: Ohad Basan <[email protected]>
---
A centos/.gitignore
A centos/Makefile
D centos/build.sh
3 files changed, 70 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-live refs/changes/45/19645/1

diff --git a/centos/.gitignore b/centos/.gitignore
new file mode 100644
index 0000000..365b2e8
--- /dev/null
+++ b/centos/.gitignore
@@ -0,0 +1,6 @@
+*.tmp
+*.log
+
+downloads
+repo
+kickstart/ovirt-live-base.ks
diff --git a/centos/Makefile b/centos/Makefile
new file mode 100644
index 0000000..1a96a9e
--- /dev/null
+++ b/centos/Makefile
@@ -0,0 +1,64 @@
+all:           \
+               prereq \
+               packages \
+               livecd \
+               $(NULL)
+
+clean:
+       rm -fr downloads/*.tmp
+       rm -fr *.tmp
+       rm -f kickstart/ovirt-live-base.ks
+
+dist-clean:    clean
+
+maintainer-clean:      dist-clean
+       rm -fr downloads
+
+prereq:
+       [ $$(id -u) = 0 ]
+
+download:      \
+               downloads/yad-0.14.2-1.fc14.x86_64.rpm \
+               downloads/TinyCore-current.iso \
+               $(NULL)
+
+_download:
+       mkdir -p downloads
+       rm -f "downloads/$(OUT)"
+       curl "$(URL)" > "downloads/$(OUT).tmp"
+       mv "downloads/$(OUT).tmp" "downloads/$(OUT)"
+
+downloads/yad-0.14.2-1.fc14.x86_64.rpm:
+       $(MAKE) _download 
URL="http://kojipkgs.fedoraproject.org//packages/yad/0.14.2/1.fc14/x86_64/yad-0.14.2-1.fc14.x86_64.rpm";
 OUT="yad-0.14.2-1.fc14.x86_64.rpm"
+
+downloads/TinyCore-current.iso:
+       $(MAKE) _download 
URL="http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/TinyCore-current.iso";
 OUT="TinyCore-current.iso"
+
+
+repo:          \
+               downloads/yad-0.14.2-1.fc14.x86_64.rpm \
+               $(NULL)
+       rm -fr repo
+       mkdir -p repo.tmp
+       ln -s ../downloads/yad-0.14.2-1.fc14.x86_64.rpm 
repo.tmp/yad-0.14.2-1.fc14.x86_64.rpm
+       createrepo repo.tmp
+       mv repo.tmp repo
+
+packages:
+       rpm -ql livecd-tools > /dev/null 2>&1 || yum install -y livecd-tools
+       rpm -ql createrepo > /dev/null 2>&1 || yum install -y createrepo
+
+
+.SUFFIXES:
+.SUFFIXES: .in
+.in:
+       sed \
+               -e "s#@PATH@#$$(pwd)#g" \
+               "$<" > "$@"
+
+livecd:                \
+               repo \
+               downloads/TinyCore-current.iso \
+               kickstart/ovirt-live-base.ks \
+               $(NULL)
+       livecd-creator -d -v  --config=kickstart/ovirt-live-gnome.ks 
--cache=/home --fslabel=ovirt-live-el6 > iso.log 2>&1
diff --git a/centos/build.sh b/centos/build.sh
deleted file mode 100755
index 2199565..0000000
--- a/centos/build.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-if [ $(id -u) != 0 ]; then
-    echo "Please run as root"
-    exit 1
-fi
-if ! rpm -q livecd-tools >  /dev/null; then 
-    yum install -y livecd-tools
-fi
-wget -N 
http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/TinyCore-current.iso
-mkdir -p oVirtLiveFiles/rpms/ oVirtLiveFiles/iso/
-wget -N 
http://kojipkgs.fedoraproject.org//packages/yad/0.14.2/1.fc14/x86_64/yad-0.14.2-1.fc14.x86_64.rpm
-mv -f *.rpm oVirtLiveFiles/rpms
-mv -f *.iso oVirtLiveFiles/iso
-createrepo oVirtLiveFiles/rpms
-sed -e "s#@PATH@#$(pwd)#g" kickstart/ovirt-live-base.ks.in > 
kickstart/ovirt-live-base.ks
-livecd-creator -d -v  --config=kickstart/ovirt-live-gnome.ks --cache=/home 
--fslabel=ovirt-live-el6 > iso.log 2>&1


-- 
To view, visit http://gerrit.ovirt.org/19645
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib83cf9e56b151c7f2b5392d7bfd6ebed2df04ac9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-live
Gerrit-Branch: master
Gerrit-Owner: Ohad Basan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to