-elif test -f $DEBCHANGELOG; then
- NAME=`head -1 $DEBCHANGELOG|sed 's/ .*//g'`
- echo "Warning: assuming name $NAME from $DEBCHANGELOG"
+elif test -f debian/control; then
+ NAME=`awk '/Source:/ {print $2}' debian/control`
+ echo "Warning: assuming name $NAME from debian/control"