+#!/bin/sh
+if test ! -f debian/control; then
+ echo "No debian/control"
+ exit 1
+fi
+if test ! -f IDMETA; then
+ echo "No IDMETA"
+ exit 1
+fi
+. ./IDMETA
+DNAME=`awk '/Source:/ {print $2}' debian/control`
+if test "$NAME" -a "$NAME" != "$DNAME"; then
+ echo "NAME in IDMETA ($NAME) does not match debian/control ($DNAME)"
+ exit 1
+fi
+
+DCH=debian/changelog
+if ! git ls-files $DCH --error-unmatch >/dev/null 2>&1; then
+ rm -f $DCH
+ echo "${DNAME} (${VERSION}-1.indexdata) unstable; urgency=medium" >$DCH
+ echo '' >>$DCH
+ echo ' * Upstream.' >>$DCH
+ echo '' >>$DCH
+ echo " -- `git config --get user.name` <`git config --get user.email`> `date -R`" >>$DCH
+ echo '' >>$DCH
+fi