Man-1.5m2

The Man package contains programs for finding and viewing manual pages.

Approximate build time:  0.1 SBU
Required disk space:     1.9MB

Man installation depends on: Bash, Binutils, Coreutils, Gawk, GCC, Glibc, Grep, Make, Sed.

Installation of Man

We'll make three adjustments to the sources of Man.

The first is a patch which allows Man to work better with recent releases of Groff. In particular, man pages will now display using the full terminal width instead of being limited to 80 characters:

patch -Np1 -i ../man-1.5m2-80cols.patch

The second is a sed substitution to add the -R switch to the PAGER variable so that escape sequences are properly handled by Less:

sed -i 's/-is/&R/' configure

The third is also a sed substitution to comment out the “MANPATH /usr/man” line in the man.conf file to prevent redundant results when using programs such as whatis:

sed -i 's%MANPATH./usr/man%#&%' src/man.conf.in

Now prepare Man for compilation:

./configure -default -confdir=/etc

The meaning of the configure options:

  • -default: This tells the configure script to select a sensible set of default options. For example: only English man pages, no message catalogs, man not suid, handle compressed man pages, compress cat pages, create cat pages whenever the appropriate directory exists, follow FHS by putting cat pages under /var/cache/man (provided that directory exists).

  • -confdir=/etc: This tells the man program to look for the man.conf configuration file in the /etc directory.

Compile the package:

make

Lastly, install it:

make install
[Note] Note

If you wish to disable SGR (Select Graphic Rendition) escape sequences, you should edit the man.conf file and add the -c switch to NROFF.

You may want to also take a look at the BLFS page at http://www.linuxfromscratch.org/blfs/view/cvs/postlfs/compressdoc.html which deals with formatting and compression issues for man pages.

Contents of Man

Installed programs: apropos, makewhatis, man, man2dvi, man2html and whatis

Short descriptions

apropos searches the whatis database and displays the short descriptions of system commands that contain a given string.

makewhatis builds the whatis database. It reads all the manual pages in the manpath and for each page writes the name and a short description in the whatis database.

man formats and displays the requested on-line manual page.

man2dvi converts a manual page into dvi format.

man2html converts a manual page into html.

whatis searches the whatis database and displays the short descriptions of system commands that contain the given keyword as a separate word.