added debian/
[smailq.git] / debian / git
diff --git a/debian/git b/debian/git
new file mode 100755 (executable)
index 0000000..41361b5
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+GITVERSION=`git describe --tags`
+#GITVERSION=`echo $GITVERSION | sed 's/-\([0-9]\+-g[0-9a-fA-F]\+\)/~\1/'`
+# ${GITVERSION/-g/~g}
+GITVERSION=`echo $GITVERSION | sed 's/^v//'`
+DEBVERSION=`head -1 debian/changelog | sed 's/.*(\(.*\)).*/\1/'`
+if [ "$DEBVERSION" != "$GITVERSION" ]; then
+    dch -v $GITVERSION "make release from git (see git changelog for more information)" || exit $?
+fi
+fakeroot debian/rules binary