[rhmessaging-commits] rhmessaging commits: r2036 - mgmt/bin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon May 12 12:32:15 EDT 2008


Author: justi9
Date: 2008-05-12 12:32:14 -0400 (Mon, 12 May 2008)
New Revision: 2036

Added:
   mgmt/bin/cumin-rpm-build
Log:
A script to build the cumin rpm using the distcvs spec file

Added: mgmt/bin/cumin-rpm-build
===================================================================
--- mgmt/bin/cumin-rpm-build	                        (rev 0)
+++ mgmt/bin/cumin-rpm-build	2008-05-12 16:32:14 UTC (rev 2036)
@@ -0,0 +1,26 @@
+#!/bin/bash -e
+
+if [ -z "$1" ]; then
+    echo "Usage: cumin-rpm-build SOURCE-TARBALL"
+    exit 1
+fi
+
+tarball=$1
+topdir="/tmp/cumin-rpm-build-${RANDOM}"
+
+echo "Building in tmp dir $topdir"
+
+mkdir "$topdir"
+cd "$topdir"
+mkdir SPECS SRPMS SOURCES RPMS BUILD
+
+cp "$tarball" "${topdir}/SOURCES"
+
+wget "http://cvs.devel.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/rpms/cumin/RHEL-5-MRG/cumin.spec?rev=HEAD" -O cumin.spec.in
+
+version=$(basename "$tarball" | cut -d . -f 3)
+#version=$(expr match "$tarball" '\(.[0-9]+\)')
+
+sed -e "$(printf 's/^Version:.*$/Version: 0.1.%s/' "$version")" cumin.spec.in > SPECS/cumin.spec
+
+rpmbuild --define "_topdir $topdir" -ba SPECS/cumin.spec


Property changes on: mgmt/bin/cumin-rpm-build
___________________________________________________________________
Name: svn:executable
   + *




More information about the rhmessaging-commits mailing list