source: chapter06/man.xml@ dc6acb5

Last change on this file since dc6acb5 was dc6acb5, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

In DocBook-NG the replacement for <ulink> is a new definition of <link>.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/LFS-RNG/BOOK@4544 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 6.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE section [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<section xmlns="http://docbook.org/docbook-ng"
7 xmlns:xlink="http://www.w3.org/1999/xlink"
8 xml:id="ch-system-man" xreflabel="Man" role="wrap">
9<title>Man-&man-version;</title>
10<?dbhtml filename="man.html"?>
11
12<indexterm zone="ch-system-man"><primary sortas="a-Man">Man</primary></indexterm>
13
14<section role="package"><title/>
15<para>The Man package contains programs for finding and viewing manual pages.</para>
16
17<segmentedlist>
18<segtitle>&buildtime;</segtitle>
19<segtitle>&diskspace;</segtitle>
20<seglistitem><seg>0.1 SBU</seg><seg>1.9MB</seg></seglistitem>
21</segmentedlist>
22
23<segmentedlist>
24<segtitle>Man installation depends on</segtitle>
25<seglistitem><seg>Bash, Binutils, Coreutils, Gawk, GCC,
26Glibc, Grep, Make, Sed</seg></seglistitem>
27</segmentedlist>
28</section>
29
30<section role="installation">
31<title>Installation of Man</title>
32
33<para>We'll make three adjustments to the sources of Man.</para>
34
35<para>The first is a patch which allows Man to work better with recent releases
36of Groff. In particular, man pages will now display using the full terminal
37width instead of being limited to 80 characters:</para>
38
39<screen><userinput>patch -Np1 -i ../man-&man-version;-80cols-1.patch</userinput></screen>
40
41<para>The second is a sed substitution to add the <parameter>-R</parameter>
42switch to the <emphasis>PAGER</emphasis> variable so that escape sequences are
43properly handled by Less:</para>
44
45<screen><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
46
47<para>The third is also a sed substitution to comment out the <quote>MANPATH
48/usr/man</quote> line in the <filename>man.conf</filename> file to prevent
49redundant results when using programs such as <command>whatis</command>:</para>
50
51<screen><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
52
53<para>Now prepare Man for compilation:</para>
54
55<screen><userinput>./configure -confdir=/etc</userinput></screen>
56
57<para>The meaning of the configure options:</para>
58
59<variablelist>
60<varlistentry>
61<term><parameter>-confdir=/etc</parameter></term>
62<listitem><para>This tells the
63<command>man</command> program to look for the <filename>man.conf</filename>
64configuration file in the <filename class="directory">/etc</filename> directory.</para></listitem>
65</varlistentry>
66</variablelist>
67
68<para>Compile the package:</para>
69
70<screen><userinput>make</userinput></screen>
71
72<para>Lastly, install it:</para>
73
74<screen><userinput>make install</userinput></screen>
75
76<note><para>If you wish to disable SGR (Select Graphic Rendition) escape sequences, you should edit the
77<filename>man.conf</filename> file and add the <parameter>-c</parameter> switch
78to NROFF.</para></note>
79
80<para>If your character set uses 8-bit characters, search for the line
81beginning with <quote>NROFF</quote> in <filename>/etc/man.conf</filename>, and verify that it coincides
82with the following:</para>
83
84<screen>NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen>
85
86<para>Note that you should use <quote>latin1</quote> even if it is not the character set
87of your locale. The reason is that,
88according to the specification, <application>groff</application> has
89no means of typesetting characters outside ISO-8859-1
90without some strange escape codes, and localized manual
91pages are therefore really a hack. When formatting manual pages,
92<application>groff</application> thinks that they are in the ISO-8859-1
93encoding and this <parameter>-Tlatin1</parameter> switch tells
94<application>groff</application> to use the same encoding for output.
95Since <application>groff</application> does no recoding of input characters,
96the formatted result is really in the same encoding as input (although
97<application>groff</application> doesn't know that it is not ISO-8859-1)
98and therefore it is usable as the input for a pager.</para>
99
100<para>Of course, this hack does not solve the problem of non-working
101<command>man2dvi</command> program for localized manual
102pages in non-ISO-8859-1 locales.
103Also, it does not work at all with multibyte character sets.
104The first problem does not have a solution currently. The second
105one is not of a concern because the LFS installation does not support
106multibyte character sets properly anyway. You may want to look at
107internationalization related hints, though.</para>
108
109<para>You may want to also take a look at the BLFS page at
110<link xlink:href="&blfs-root;view/cvs/postlfs/compressdoc.html"/> which deals with
111formatting and compression issues for man pages.</para>
112
113</section>
114
115
116<section xml:id="contents-man" role="content"><title>Contents of Man</title>
117
118<segmentedlist>
119<segtitle>Installed programs</segtitle>
120<seglistitem><seg>apropos, makewhatis, man,
121man2dvi, man2html and whatis</seg></seglistitem>
122</segmentedlist>
123
124<variablelist><title>Short descriptions</title>
125
126<varlistentry xml:id="apropos">
127<term><command>apropos</command></term>
128<listitem>
129<indexterm zone="ch-system-man apropos"><primary sortas="b-apropos">apropos</primary></indexterm>
130<para>searches the whatis database and displays
131the short descriptions of system commands that contain a given string.</para>
132</listitem>
133</varlistentry>
134
135<varlistentry xml:id="makewhatis">
136<term><command>makewhatis</command></term>
137<listitem>
138<indexterm zone="ch-system-man makewhatis"><primary sortas="b-makewhatis">makewhatis</primary></indexterm>
139<para>builds the whatis database. It reads
140all the manual pages in the manpath and for each page writes the name and a
141short description in the whatis database.</para>
142</listitem>
143</varlistentry>
144
145<varlistentry xml:id="man">
146<term><command>man</command></term>
147<listitem>
148<indexterm zone="ch-system-man man"><primary sortas="b-man">man</primary></indexterm>
149<para>formats and displays the requested on-line manual page.</para>
150</listitem>
151</varlistentry>
152
153<varlistentry xml:id="man2dvi">
154<term><command>man2dvi</command></term>
155<listitem>
156<indexterm zone="ch-system-man man2dvi"><primary sortas="b-man2dvi">man2dvi</primary></indexterm>
157<para>converts a manual page into dvi format.</para>
158</listitem>
159</varlistentry>
160
161<varlistentry xml:id="man2html">
162<term><command>man2html</command></term>
163<listitem>
164<indexterm zone="ch-system-man man2html"><primary sortas="b-man2html">man2html</primary></indexterm>
165<para>converts a manual page into html.</para>
166</listitem>
167</varlistentry>
168
169<varlistentry xml:id="whatis">
170<term><command>whatis</command></term>
171<listitem>
172<indexterm zone="ch-system-man whatis"><primary sortas="b-whatis">whatis</primary></indexterm>
173<para>searches the whatis database and displays the short descriptions of system
174commands that contain the given keyword as a separate word.</para>
175</listitem>
176</varlistentry>
177</variablelist>
178
179</section>
180
181</section>
Note: See TracBrowser for help on using the repository browser.