Permalink
Browse files

Cleanup, actually build rpms from script

  • Loading branch information...
toddlipcon committed Oct 21, 2009
1 parent 14587c7 commit da871d3774bcd5acb1090031a5e87fbcac0687dc
Showing with 21 additions and 6 deletions.
  1. +20 −5 run.sh
  2. +1 −1 template.spec
View
25 run.sh
@@ -1,13 +1,21 @@
#!/bin/bash -e
-
+##############################
+# Begin configurables
+##############################
+SVNURL=http://hadoop-gpl-compression.googlecode.com/svn/trunk/
+if [ -z "$SVN_REV" ]; then
+ SVN_REV=$(svn info $SVNURL | grep Revision | awk '{print $2}')
+fi
+VERSION=${VERSION:-0.2.0svn$SVN_REV}
+RELEASE=${RELEASE:-1}
+##############################
+# End configurables
+##############################
-ARCH_BITS=${ARCH_BITS:-$SYSTEM_BITS}
BINDIR=$(dirname $0)
TOPDIR=$BINDIR/build/topdir
-SVNURL=http://hadoop-gpl-compression.googlecode.com/svn/trunk/
-SVN_REV=$(svn info $SVNURL | grep Revision | awk '{print $2}')
-VERSION=0.2.0svn$SVN_REV
+
SVNCO=$BINDIR/hadoop-gpl-compression-$VERSION
SVNTAR=$BINDIR/hadoop-gpl-compression-$VERSION.tar.gz
@@ -41,14 +49,21 @@ mkdir -p $TOPDIR
cat $BINDIR/template.spec | sed "
s,@VERSION@,$VERSION,g;
+ s,@RELEASE@,$RELEASE,g;
s,@PACKAGER@,$PACKAGER,g;
s,@PACKAGER_EMAIL@,$PACKAGER_EMAIL,g;
s,@HADOOP_HOME@,$HADOOP_HOME,g;
" > $TOPDIR/SPECS/hadoop-gpl-compression.spec
cp $SVNTAR $TOPDIR/SOURCES
+pushd $TOPDIR/SPECS > /dev/null
+rpmbuild $RPMBUILD_FLAGS \
+ --buildroot $(pwd)/../BUILDROOT \
+ --define "_topdir $(pwd)/.." \
+ -ba hadoop-gpl-compression.spec
##############################
# Deb
##############################
+# COMING SOON!
View
@@ -1,7 +1,7 @@
Summary: GPL Compression Libraries for Hadoop
Name: hadoop-gpl-compression
Version: @VERSION@
-Release: 1
+Release: @RELEASE@
License: GPL
Source0: hadoop-gpl-compression-@VERSION@.tar.gz
Group: Development/Libraries

0 comments on commit da871d3

Please sign in to comment.