if test -n "$NAME"; then
PRODUCT=$NAME
else
- DEBCHANGELOG=debian/changelog
- if test ! -f $DEBCHANGELOG; then
- echo "$DEBCHANGELOG missing"
+ DEBCONTROL=debian/control
+ if test ! -f $DEBCONTROL; then
+ echo "$DEBCONTROL missing"
echo "The current directory should be base source of package"
exit 1
fi
- l=`head -1 $DEBCHANGELOG`
- PRODUCT=`echo $l|sed 's/ .*//g'`
+ PRODUCT=`awk '/Source:/ {print $2}' $DEBCONTROL`
fi
TAR=${PRODUCT}-${VERSION}.tar.gz
echo "TAR=$TAR"