| 1 | #!/bin/sh |
| 2 | MANDIR=debian |
| 3 | mkdir -p $MANDIR |
| 4 | |
| 5 | VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'` |
| 6 | NAME=`grep "^Description:" debian/control | sed 's/^Description: *//'` |
| 7 | PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//'` |
| 8 | |
| 9 | AUTHOR=".SH AUTHOR\nThis manpage was written by $DEBFULLNAME for the Debian distribution and |
| 10 | can be used for any other usage of the program. |
| 11 | " |
| 12 | |
| 13 | # If program name is different from package name or title should be |
| 14 | # different from package short description change this here |
| 15 | progname=${PROGNAME} |
| 16 | help2man --no-info --no-discard-stderr \ |
| 17 | --name="$NAME" \ |
| 18 | --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1 |
| 19 | echo $AUTHOR >> $MANDIR/${progname}.1 |
| 20 | |
| 21 | echo "$MANDIR/*.1" > debian/manpages |
| 22 | |
| 23 | cat <<EOT |
| 24 | Please enhance the help2man output. |
| 25 | The following web page might be helpful in doing so: |
| 26 | http://liw.fi/manpages/ |
| 27 | EOT |