Debian Codegraph @

debian/createmanpages

raw
1 #!/bin/sh
2 MANDIR=debian/mans
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: *//' | head -n1`
7 PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//' | head -n1`
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 progname=bcalm
14 help2man --no-info --no-discard-stderr --help-option="-h" \
15 --name="$NAME" \
16 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
17 echo $AUTHOR >> $MANDIR/${progname}.1
18
19 echo "$MANDIR/*.1" > debian/manpages
20
21 cat <<EOT
22 Please enhance the help2man output.
23 The following web page might be helpful in doing so:
24 http://liw.fi/manpages/
25 EOT
26