Commit 1fad8125 authored by Andreas Tille's avatar Andreas Tille
Browse files

create simple defaults for binary name=packagename and title=shortdesc

parent d61da287
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3,14 +3,18 @@ MANDIR=debian
mkdir -p $MANDIR

VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`
NAME=`grep "^Description:" debian/control | sed 's/^Description: *//'`
PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//'`

AUTHOR=".SH AUTHOR\nThis manpage was written by $DEBFULLNAME for the Debian distribution and
can be used for any other usage of the program.
"

progname=<PROGNAME>
# If program name is different from package name or title should be
# different from package short description change this here
progname=${PROGNAME}
help2man --no-info --no-discard-stderr --help-option=" " \
         --name='<optional description of the program>' \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
echo $AUTHOR >> $MANDIR/${progname}.1