-echo "Checking package with lintian"
-DEBVERSION=`sed -n -e "s/${DEBPKG} (\(.*\)).*/\1/p" < ${WORK_DIR}/debian/changelog |head -1`
-pushd ${PACKAGE_DIR} > /dev/null
-lintian ${DEBPKG}_${DEBVERSION}_*.changes
-popd > /dev/null
+if [ -z "${DEB_VERSION}" -o -z "${UPSTREAM_VERSION}" ]; then
+ echo "Error: unable to parse version in changelog file"
+ exit 1
+fi
+
+echo "Building Debian files"
+test -s CVS/Root && export CVSROOT=`cat CVS/Root`
+cd ${WORK_DIR}
+cvs com -m 'Autocommit for make-debian'
+cvs-buildpackage -rfakeroot -kkevin@rosenberg.net -F -d ${DEBPKG} -uc -us -sa -i -H${WORK_DIR}/debian/cvsbp-prepare.sh $* > ${BUILD_LOG} 2>&1