#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TOPDIR="$DIR/TMP";
DBPATH="$DIR/TMP/RPMDB";

rm -rf "$TOPDIR";

rpmbuild \
	--define "_dbpath $DBPATH" \
	--define "_topdir $TOPDIR" \
	-bb \
	"$DIR/sql-dk.spec";
	
cp "$TOPDIR"/RPMS/*/sql-dk-*.rpm .
