r2203: *** empty log message ***
[uffi.git] / debian / make-debian.sh
diff --git a/debian/make-debian.sh b/debian/make-debian.sh
new file mode 100755 (executable)
index 0000000..53bd24d
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -e
+
+PKG=uffi
+DEBPKG=cl-uffi
+
+PACKAGE_DIR=/usr/local/src/Packages/${DEBPKG}
+WORK_DIR=/usr/local/src/Work/${PKG}
+
+echo "Building Debian files"
+export CVSROOT=`cat CVS/Root`
+pushd ${WORK_DIR} > /dev/null
+cvs-buildpackage -rfakeroot -kkevin@rosenberg.net -F -d ${DEBPKG} -uc -us -sa -i.cvsignore $*
+popd > /dev/null
+
+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
+
+exit 0