1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" |
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ |
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent"> |
---|
5 | %general-entities; |
---|
6 | ]> |
---|
7 | |
---|
8 | <sect1 id="ch-system-man" role="wrap"> |
---|
9 | <?dbhtml filename="man.html"?> |
---|
10 | |
---|
11 | <title>Man-&man-version;</title> |
---|
12 | |
---|
13 | <indexterm zone="ch-system-man"> |
---|
14 | <primary sortas="a-Man">Man</primary> |
---|
15 | </indexterm> |
---|
16 | |
---|
17 | <sect2 role="package"> |
---|
18 | <title/> |
---|
19 | |
---|
20 | <para>The Man package contains programs for finding and viewing man |
---|
21 | pages.</para> |
---|
22 | |
---|
23 | </sect2> |
---|
24 | |
---|
25 | <sect2 role="installation"> |
---|
26 | <title>Installation of Man</title> |
---|
27 | |
---|
28 | <para os="a">A few adjustments need to be made to the sources of Man.</para> |
---|
29 | |
---|
30 | <para os="b">First, a <command>sed</command> substitution is needed to |
---|
31 | modify <command>configure</command>'s default search path for executables. |
---|
32 | It cycles through the values in <envar>PREPATH</envar> until it finds the |
---|
33 | program it is looking for. The <option>-R</option> switch is added to the |
---|
34 | <envar>PAGER</envar> variable so that escape sequences are properly handled |
---|
35 | by Less:</para> |
---|
36 | |
---|
37 | <screen os="c"><userinput>cp configure{,.orig} |
---|
38 | sed -e "/PREPATH=/s@=.*@=\"$(eval echo ${CLFS}/{,usr/}{sbin,bin})\"@g" \ |
---|
39 | -e 's@-is@&R@g' configure.orig > configure</userinput></screen> |
---|
40 | |
---|
41 | <para os="d">Another couple of <command>sed</command> substitutions |
---|
42 | comment out the <quote>MANPATH /usr/man</quote> and |
---|
43 | <quote>MANPATH /usr/local/man</quote> lines in the |
---|
44 | <filename>man.conf</filename> file to prevent redundant |
---|
45 | results when using programs such as <command>whatis</command>:</para> |
---|
46 | |
---|
47 | <screen os="e"><userinput>cp src/man.conf.in{,.orig} |
---|
48 | sed -e 's@MANPATH./usr/man@#&@g' \ |
---|
49 | -e 's@MANPATH./usr/local/man@#&@g' \ |
---|
50 | src/man.conf.in.orig > src/man.conf.in</userinput></screen> |
---|
51 | |
---|
52 | <para os="f">Finally, correct a syntax error in the |
---|
53 | <command>makewhatis</command> script:</para> |
---|
54 | |
---|
55 | <screen os="g"><userinput>cp src/makewhatis.sh{,.orig} |
---|
56 | sed 's@)) |@) |@' src/makewhatis.sh.orig > src/makewhatis.sh</userinput></screen> |
---|
57 | |
---|
58 | <para os="h">Prepare Man for compilation:</para> |
---|
59 | |
---|
60 | <screen os="i"><userinput>./configure -confdir=/etc</userinput></screen> |
---|
61 | |
---|
62 | <variablelist os="j"> |
---|
63 | <title>The meaning of the configure options:</title> |
---|
64 | |
---|
65 | <varlistentry> |
---|
66 | <term><parameter>-confdir=/etc</parameter></term> |
---|
67 | <listitem> |
---|
68 | <para>This tells the <command>man</command> program to look for the |
---|
69 | <filename>man.conf</filename> configuration file in the <filename |
---|
70 | class="directory">/etc</filename> directory.</para> |
---|
71 | </listitem> |
---|
72 | </varlistentry> |
---|
73 | </variablelist> |
---|
74 | |
---|
75 | <para os="k">Configure was modified to look in <filename |
---|
76 | class="directory">${CLFS}</filename> for the paths of helper |
---|
77 | programs. Right now all of the programs have <filename |
---|
78 | class="directory">${CLFS}</filename> as a prefix. Remove that prefix |
---|
79 | with the following command:</para> |
---|
80 | |
---|
81 | <screen os="l"><userinput>cp conf_script{,.orig} |
---|
82 | sed "s@${CLFS}@@" conf_script.orig > conf_script</userinput></screen> |
---|
83 | |
---|
84 | <para os="m">Build makemsg using the hosts gcc. It is executed during the build:</para> |
---|
85 | |
---|
86 | <screen os="n"><userinput>gcc src/makemsg.c -o src/makemsg</userinput></screen> |
---|
87 | |
---|
88 | <para os="o">Compile the package:</para> |
---|
89 | |
---|
90 | <screen os="p"><userinput>make</userinput></screen> |
---|
91 | |
---|
92 | <para os="q">Install the package:</para> |
---|
93 | |
---|
94 | <screen os="r"><userinput>make DESTDIR=${CLFS} install</userinput></screen> |
---|
95 | |
---|
96 | <note os="s"> |
---|
97 | <para>If you will be working on a terminal that does not support |
---|
98 | text attributes such as color and bold, you can disable Select |
---|
99 | Graphic Rendition (SGR) escape sequences by editing the |
---|
100 | <filename>man.conf</filename> file and adding the <option>-c</option> |
---|
101 | option to the <envar>NROFF</envar> variable. If you use multiple |
---|
102 | terminal types for one computer it may be better to selectively add |
---|
103 | the <envar>GROFF_NO_SGR</envar> environment variable for the terminals |
---|
104 | that do not support SGR.</para> |
---|
105 | </note> |
---|
106 | |
---|
107 | <para os="t">If the character set of the locale uses 8-bit characters, search |
---|
108 | for the line beginning with <quote>NROFF</quote> in |
---|
109 | <filename>/etc/man.conf</filename>, and verify that it matches the |
---|
110 | following:</para> |
---|
111 | |
---|
112 | <screen os="u">NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen> |
---|
113 | |
---|
114 | <para os="v">Note that <quote>latin1</quote> should be used even if it is not |
---|
115 | the character set of the locale. The reason is that, according to the |
---|
116 | specification, <command>groff</command> has no means of typesetting |
---|
117 | characters outside International Organization for Standards (ISO) 8859-1 |
---|
118 | without some strange escape codes. When formatting man pages, |
---|
119 | <command>groff</command> thinks that they are in the ISO 8859-1 encoding |
---|
120 | and this <parameter>-Tlatin1</parameter> switch tells |
---|
121 | <command>groff</command> to use the same encoding for output. Since |
---|
122 | <command>groff</command> does no recoding of input characters, the f |
---|
123 | ormatted result is really in the same encoding as input, and therefore |
---|
124 | it is usable as the input for a pager.</para> |
---|
125 | |
---|
126 | <para os="w">This does not solve the problem of a non-working |
---|
127 | <command>man2dvi</command> program for localized man pages in |
---|
128 | non-ISO 8859-1 locales. Also, it does not work with multibyte |
---|
129 | character sets. The first problem does not currently have a solution. |
---|
130 | The second issue is not of concern because the CLFS installation does |
---|
131 | not support multibyte character sets.</para> |
---|
132 | |
---|
133 | <para os="x">Additional information with regards to the compression of |
---|
134 | man and info pages can be found in the BLFS book at |
---|
135 | <ulink url="&blfs-root;view/svn/postlfs/compressdoc.html"/>.</para> |
---|
136 | |
---|
137 | </sect2> |
---|
138 | |
---|
139 | <sect2 id="contents-man" role="content"> |
---|
140 | <title>Contents of Man</title> |
---|
141 | |
---|
142 | <segmentedlist> |
---|
143 | <segtitle>Installed programs</segtitle> |
---|
144 | |
---|
145 | <seglistitem> |
---|
146 | <seg>apropos, makewhatis, man, man2dvi, man2html, and whatis</seg> |
---|
147 | </seglistitem> |
---|
148 | </segmentedlist> |
---|
149 | |
---|
150 | <variablelist> |
---|
151 | <bridgehead renderas="sect3">Short Descriptions</bridgehead> |
---|
152 | <?dbfo list-presentation="list"?> |
---|
153 | <?dbhtml list-presentation="table"?> |
---|
154 | |
---|
155 | <varlistentry id="apropos"> |
---|
156 | <term><command>apropos</command></term> |
---|
157 | <listitem> |
---|
158 | <para>Searches the <command>whatis</command> database and |
---|
159 | displays the short descriptions of system commands that contain |
---|
160 | a given string</para> |
---|
161 | <indexterm zone="ch-system-man apropos"> |
---|
162 | <primary sortas="b-apropos">apropos</primary> |
---|
163 | </indexterm> |
---|
164 | </listitem> |
---|
165 | </varlistentry> |
---|
166 | |
---|
167 | <varlistentry id="makewhatis"> |
---|
168 | <term><command>makewhatis</command></term> |
---|
169 | <listitem> |
---|
170 | <para>Builds the <command>whatis</command> database; it reads all |
---|
171 | the man pages in the <envar>MANPATH</envar> and writes the name |
---|
172 | and a short description in the <command>whatis</command> database |
---|
173 | for each page</para> |
---|
174 | <indexterm zone="ch-system-man makewhatis"> |
---|
175 | <primary sortas="b-makewhatis">makewhatis</primary> |
---|
176 | </indexterm> |
---|
177 | </listitem> |
---|
178 | </varlistentry> |
---|
179 | |
---|
180 | <varlistentry id="man"> |
---|
181 | <term><command>man</command></term> |
---|
182 | <listitem> |
---|
183 | <para>Formats and displays the requested on-line man page</para> |
---|
184 | <indexterm zone="ch-system-man man"> |
---|
185 | <primary sortas="b-man">man</primary> |
---|
186 | </indexterm> |
---|
187 | </listitem> |
---|
188 | </varlistentry> |
---|
189 | |
---|
190 | <varlistentry id="man2dvi"> |
---|
191 | <term><command>man2dvi</command></term> |
---|
192 | <listitem> |
---|
193 | <para>Converts a man page into dvi format</para> |
---|
194 | <indexterm zone="ch-system-man man2dvi"> |
---|
195 | <primary sortas="b-man2dvi">man2dvi</primary> |
---|
196 | </indexterm> |
---|
197 | </listitem> |
---|
198 | </varlistentry> |
---|
199 | |
---|
200 | <varlistentry id="man2html"> |
---|
201 | <term><command>man2html</command></term> |
---|
202 | <listitem> |
---|
203 | <para>Converts a man page into HTML</para> |
---|
204 | <indexterm zone="ch-system-man man2html"> |
---|
205 | <primary sortas="b-man2html">man2html</primary> |
---|
206 | </indexterm> |
---|
207 | </listitem> |
---|
208 | </varlistentry> |
---|
209 | |
---|
210 | <varlistentry id="whatis"> |
---|
211 | <term><command>whatis</command></term> |
---|
212 | <listitem> |
---|
213 | <para>Searches the <command>whatis</command> database and |
---|
214 | displays the short descriptions of system commands that |
---|
215 | contain the given keyword as a separate word</para> |
---|
216 | <indexterm zone="ch-system-man whatis"> |
---|
217 | <primary sortas="b-whatis">whatis</primary> |
---|
218 | </indexterm> |
---|
219 | </listitem> |
---|
220 | </varlistentry> |
---|
221 | |
---|
222 | </variablelist> |
---|
223 | |
---|
224 | </sect2> |
---|
225 | |
---|
226 | </sect1> |
---|