source: clfs-sysroot/BOOK/final-system/common/man.xml@ b514765

Last change on this file since b514765 was f386fcc, checked in by Joe Ciccone <jciccone@…>, 18 years ago

Added command to man instructions to comment out /usr/local/man.

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