#!/bin/sh THISDIR=`pwd` RPMROOT=/usr/src/redhat NAME=cp2103 VER_MAJ=0 VER_MIN=11 VER_PAT=0 VERSION=$VER_MAJ.$VER_MIN.$VER_PAT echo $PWD echo "Creating infrastructure." cd $RPMROOT/SOURCES rm -rf $NAME-$VERSION rm -rf $NAME-$VERSION.tar.gz mkdir $NAME-$VERSION cd $NAME-$VERSION echo "Copying source code." cp -R $THISDIR/. . echo "Packaging source code." cd .. tar cvf $NAME-$VERSION.tar $NAME-$VERSION gzip $NAME-$VERSION.tar echo "Copying source to RPM subsystem." cp $NAME-$VERSION/rpm/$NAME.spec $RPMROOT/SPECS/. echo "Starting RPM build..." KERNEL_BLD_VERSION=`uname -r` export KERNEL_BLD_VERSION rpmbuild -bs $RPMROOT/SPECS/cp2103.spec