Debian Codegraph @

debian/createmanpages

raw
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: *//' | head -n1`
7 PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//' | head -n1`
8
9 AUTHOR=".SH AUTHOR\n\
10 This manpage was written by $DEBFULLNAME for the Debian\n\
11 distribution and can be used for any other usage of the program.\
12 "
13
14 # If program name is different from package name or title should be
15 # different from package short description change this here
16 for progname in zlint zlint-gtld-update
17 do
18 help2man --no-info --no-discard-stderr --help-option="--help" \
19 --name="$NAME" \
20 --include="${MANDIR}/zlint-generic.h2m" \
21 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
22 echo $AUTHOR >> $MANDIR/${progname}.1
23
24 cat <<EOT
25 Wrote help2man output to '$MANDIR/${progname}.1'.
26 To inspect it, try 'nroff -man $MANDIR/${progname}.1'.
27
28 EOT
29 done
30
31 echo "$MANDIR/*.1" > debian/manpages
32
33 cat <<EOT
34 If very unhappy, try passing the HELPOPTION as an environment variable.
35 The following web page might be helpful in doing so:
36 http://liw.fi/manpages/
37 EOT