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

Last change on this file since 9db6797 was 12e6567, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Added a sysroot wrapper.
Updated the build variables section of the book, each package uses its own.

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