#!/bin/sh

RPM_TOP_DIR=`rpm --eval '%_topdir'`
RPM_CMD=rpmbuild
VERSION=0.1
NAME=iiimf-qt

cd ../
rm -rf $NAME-$VERSION.tar $NAME-$VERSION.tar.bz2 $NAME-$VERSION
cp -rf iiimqcf $NAME-$VERSION
find $NAME-$VERSION -name ".svn" -exec rm -rf {} \; 
tar cvf $NAME-$VERSION.tar $NAME-$VERSION
bzip2 $NAME-$VERSION.tar

cp -rf $NAME-$VERSION.tar.bz2 $RPM_TOP_DIR/SOURCES/
cp -rf iiimqcf/src/iiimqcf.spec $RPM_TOP_DIR/SPECS/
cd $RPM_TOP_DIR/SPECS

$RPM_CMD -ba iiimqcf.spec
