set -e
-VERSION=`cat VERSION`
DEBPKG=cl-uffi
PKG=uffi
TOPDIR=`basename $PWD`
+VERSION=`cat VERSION`
+DEBVERSION=`sed -n -e "s/${DEBPKG} (\(.*\)-[0-9]).*/\1/p" < debian/changelog |head -1`
+echo ${DEBVERSION}
+
DISTDIR=${PKG}-${VERSION}
DEBDIR=${DEBPKG}-${VERSION}
-#echo "(re)tagging with release tag '$TAG'"
-#TAG=upstream_version_`echo $VERSION | tr . _`
-#cvs -q rtag -d $TAG $PKG
-#cvs -q tag -F $TAG
+echo "(re)tagging with release tag '$TAG'"
+TAG=debian_version_`echo ${DEBVERSION} | tr . _`
+cvs -q rtag -d $TAG $PKG
+cvs -q tag -F $TAG
# Prepare for archive