summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-05 15:43:11 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-05 15:43:11 +0100
commit7f9167d2726d7cc48c85fcc36c06ea5a6db80add (patch)
tree45c7d81825b0ca88db883eacb48246b18d78140d /bin
parent3912777a8cb8e5a0a2bd6eb48069095c5e3ce205 (diff)
downloadpykolab-7f9167d2726d7cc48c85fcc36c06ea5a6db80add.tar.gz
Add rebuild.sh.in to GIT
Diffstat (limited to 'bin')
-rw-r--r--bin/rebuild.sh.in63
1 files changed, 63 insertions, 0 deletions
diff --git a/bin/rebuild.sh.in b/bin/rebuild.sh.in
new file mode 100644
index 0000000..1e35ce0
--- /dev/null
+++ b/bin/rebuild.sh.in
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+package=@PACKAGE@
+version=@VERSION@
+release=@RELEASE@
+
+srpmdir=`rpm --eval="%{_srcrpmdir}"`
+
+declare -a dists
+declare -a dist_tags
+declare -a product_series
+
+declare -a answers
+declare -a tasks
+
+dists[${#dists[@]}]='f16'; dist_tags[${#dist_tags[@]}]='fc16'; product_series[${#product_series[@]}]="3.0"
+dists[${#dists[@]}]='f17'; dist_tags[${#dist_tags[@]}]='fc17'; product_series[${#product_series[@]}]="3.0"
+dists[${#dists[@]}]='el5'; dist_tags[${#dist_tags[@]}]='el5'; product_series[${#product_series[@]}]="2.4"
+dists[${#dists[@]}]='el6'; dist_tags[${#dist_tags[@]}]='el6'; product_series[${#product_series[@]}]="2.4"
+dists[${#dists[@]}]='el6'; dist_tags[${#dist_tags[@]}]='el6'; product_series[${#product_series[@]}]="3.0"
+
+autoreconf -v && ./configure && make dist || exit 1
+
+x=0
+while [ $x -lt ${#dists[@]} ]; do
+
+ read -p "Build for ${dists[$x]} / ${product_series[$x]}? [Y/n]: " answers[${#answers[@]}]
+
+ if [ "${answers[$x]}" != "n" ]; then
+ answers[$x]="y"
+ fi
+ let x++
+done
+
+x=0
+while [ $x -lt ${#dists[@]} ]; do
+ if [ "${answers[$x]}" == "y" ]; then
+ rpmbuild --define="dist .${dist_tags[$x]}.kolab_${product_series[$x]}" -ts ${package}-${version}.tar.gz
+ tasks[${#tasks[@]}]=`koji build --nowait \
+ feature-${dists[$x]}-kolab-${product_series[$x]}-development \
+ ${srpmdir}/${package}-${version}-${release}.${dist_tags[$x]}.kolab_${product_series[$x]}.src.rpm 2>&1 | \
+ grep "^Created task:" | awk '{print $3}'`
+ fi
+
+ let x++
+done
+
+koji watch-task ${tasks[@]}
+
+x=0
+while [ $x -lt ${#dists[@]} ]; do
+ if [ "${answers[$x]}" == "y" ]; then
+ koji wait-repo \
+ --build=${package}-${version}-${release}.${dist_tags[$x]}.kolab_${product_series[$x]} \
+ feature-${dists[$x]}-kolab-${product_series[$x]}-development-build &
+ fi
+
+ let x++
+done
+
+wait
+
+echo "All done."