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

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

Added 2 seds to man.xml; the first makes configure detect the paths of programs in $CLFS and the second strips $CLFS out of conf_script.

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