Installation of Man
We'll make three adjustments to the sources of Man.
The first patch comments out the "MANPATH /usr/man" line in the
man.conf file to prevent redundant results when using
programs such as whatis:
patch -Np1 -i ../man-&man-manpath-patch-version;-manpath.patch
The second patch adds the -R option to the
PAGER variable so that escape sequences are
handled properly:
patch -Np1 -i ../man-&man-pager-patch-version;-pager.patch
The third and last patch prevents a problem when man pages not formatted
with more than 80 columns are used in conjunction with recent releases of
groff:
patch -Np1 -i ../man-&man-80cols-patch-version;-80cols.patch
The paths to some programs are hard-wired into Man's executables.
Unfortunately, the configuration script picks the last location in PATH
rather than the first place a program is found. By appending
/usr/bin:/bin to PATH for the
./configure command, we ensure that Man doesn't
use the programs in the /tools
directory.
Now prepare Man for compilation:
PATH=$PATH:/usr/bin:/bin ./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 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
And install it:
make install
If you wish to disable SGR escape sequences, you should
edit the man.conf file and add the -c argument
to nroff.
You may want to also take a look at the BLFS book which deals with
formatting and compression issues for man pages.