]> oss.titaniummirror.com Git - cp210x.git/blobdiff - rpm/buildRPM
This is the original version as sent by Silicon Labs. It was an older version
[cp210x.git] / rpm / buildRPM
diff --git a/rpm/buildRPM b/rpm/buildRPM
new file mode 100755 (executable)
index 0000000..dbe689b
--- /dev/null
@@ -0,0 +1,38 @@
+#!/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
+
+
+
+
+