source: clfs-sysroot/BOOK/final-system/common/bzip2.xml@ e711c4b

Last change on this file since e711c4b was 264174f, checked in by Joe Ciccone <jciccone@…>, 16 years ago

bzip2 changes from trunk.

  • Property mode set to 100644
File size: 8.0 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-bzip2" role="wrap">
9 <?dbhtml filename="bzip2.html"?>
10
11 <title>Bzip2-&bzip2-version;</title>
12
13 <indexterm zone="ch-system-bzip2">
14 <primary sortas="a-Bzip2">Bzip2</primary>
15 </indexterm>
16
17 <sect2 role="package">
18 <title/>
19
20 <para>The Bzip2 package contains programs for compressing and
21 decompressing files. Compressing text files with <command>bzip2</command>
22 yields a much better compression percentage than with the traditional
23 <command>gzip</command>.</para>
24
25 </sect2>
26
27 <sect2 role="installation">
28 <title>Installation of Bzip2</title>
29
30 <para os="s1">Bzip2's default Makefile target automatically runs
31 the testsuite as well. Disable the tests since you can not run the
32 cross-compiled binaries causing all of the tests to fail:</para>
33
34<screen os="s2"><userinput>cp Makefile{,.orig}
35sed -e "/^all:/s/ test//" Makefile.orig &gt; Makefile</userinput></screen>
36
37 <para os="s3">By default Bzip2 creates some symlinks that use absolute
38 pathnames. The following sed will cause them to be created with relative
39 paths instead:</para>
40
41<screen os="s4"><userinput>sed -i -e 's:ln -s -f $(PREFIX)/bin/:ln -s :' Makefile</userinput></screen>
42
43 <para os="a">The Bzip2 package does not contain a <command>configure</command>
44 script. Compile it with:</para>
45
46<screen os="b"><userinput>make -f Makefile-libbz2_so CC="${CC}" AR="${AR}" RANLIB="${RANLIB}"
47make clean</userinput></screen>
48
49 <para os="c">The <parameter>-f</parameter> flag will cause Bzip2 to be built
50 using a different <filename>Makefile</filename> file, in this case the
51 <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
52 <filename class="libraryfile">libbz2.so</filename> library and links the
53 Bzip2 utilities against it.</para>
54
55 <para os="d">Recompile the package using a non-shared library.</para>
56
57<screen os="e"><userinput>make CC="${CC}" AR="${AR}" RANLIB="${RANLIB}"</userinput></screen>
58
59 <para os="g">Install the programs:</para>
60
61<screen os="h"><userinput>make PREFIX=${CLFS}/usr install</userinput></screen>
62
63 <para os="i">Install the shared <command>bzip2</command> binary into the
64 <filename class="directory">${CLFS}/bin</filename> directory, make
65 some necessary symbolic links, and clean up:</para>
66
67<screen os="j"><userinput>cp -v bzip2-shared ${CLFS}/bin/bzip2
68cp -av libbz2.so* ${CLFS}/lib
69ln -sfv ../../lib/libbz2.so.1.0 ${CLFS}/usr/lib/libbz2.so
70rm -v ${CLFS}/usr/bin/{bunzip2,bzcat,bzip2}
71ln -sfv bzip2 ${CLFS}/bin/bunzip2
72ln -sfv bzip2 ${CLFS}/bin/bzcat</userinput></screen>
73
74 </sect2>
75
76 <sect2 id="contents-bzip2" role="content">
77 <title>Contents of Bzip2</title>
78
79 <segmentedlist>
80 <segtitle>Installed programs</segtitle>
81 <segtitle>Installed libraries</segtitle>
82
83 <seglistitem>
84 <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp (link to
85 bzdiff), bzdiff, bzegrep (link to bzgrep), bzfgrep (link to bzgrep),
86 bzgrep, bzip2, bzip2recover, bzless (link to bzmore), and bzmore</seg>
87 <seg>libbz2.a, libbz2.so (link to libbz2.so.1.0), libbz2.so.1.0 (link to
88 libbz2.so.&bzip2-version;), and libbz2.so.&bzip2-version;</seg>
89 </seglistitem>
90 </segmentedlist>
91
92 <variablelist>
93 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
94 <?dbfo list-presentation="list"?>
95 <?dbhtml list-presentation="table"?>
96
97 <varlistentry id="bunzip2">
98 <term><command>bunzip2</command></term>
99 <listitem>
100 <para>Decompresses bzipped files</para>
101 <indexterm zone="ch-system-bzip2 bunzip2">
102 <primary sortas="b-bunzip2">bunzip2</primary>
103 </indexterm>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry id="bzcat">
108 <term><command>bzcat</command></term>
109 <listitem>
110 <para>Decompresses to standard output</para>
111 <indexterm zone="ch-system-bzip2 bzcat">
112 <primary sortas="b-bzcat">bzcat</primary>
113 </indexterm>
114 </listitem>
115 </varlistentry>
116
117 <varlistentry id="bzcmp">
118 <term><command>bzcmp</command></term>
119 <listitem>
120 <para>Runs <command>cmp</command> on bzipped files</para>
121 <indexterm zone="ch-system-bzip2 bzcmp">
122 <primary sortas="b-bzcmp">bzcmp</primary>
123 </indexterm>
124 </listitem>
125 </varlistentry>
126
127 <varlistentry id="bzdiff">
128 <term><command>bzdiff</command></term>
129 <listitem>
130 <para>Runs <command>diff</command> on bzipped files</para>
131 <indexterm zone="ch-system-bzip2 bzdiff">
132 <primary sortas="b-bzdiff">bzdiff</primary>
133 </indexterm>
134 </listitem>
135 </varlistentry>
136
137 <varlistentry id="bzgrep">
138 <term><command>bzgrep</command></term>
139 <listitem>
140 <para>Runs <command>grep</command> on bzipped files</para>
141 <indexterm zone="ch-system-bzip2 bzgrep">
142 <primary sortas="b-bzgrep">bzgrep</primary>
143 </indexterm>
144 </listitem>
145 </varlistentry>
146
147 <varlistentry id="bzegrep">
148 <term><command>bzegrep</command></term>
149 <listitem>
150 <para>Runs <command>egrep</command> on bzipped files</para>
151 <indexterm zone="ch-system-bzip2 bzegrep">
152 <primary sortas="b-bzegrep">bzegrep</primary>
153 </indexterm>
154 </listitem>
155 </varlistentry>
156
157 <varlistentry id="bzfgrep">
158 <term><command>bzfgrep</command></term>
159 <listitem>
160 <para>Runs <command>fgrep</command> on bzipped files</para>
161 <indexterm zone="ch-system-bzip2 bzfgrep">
162 <primary sortas="b-bzfgrep">bzfgrep</primary>
163 </indexterm>
164 </listitem>
165 </varlistentry>
166
167 <varlistentry id="bzip2">
168 <term><command>bzip2</command></term>
169 <listitem>
170 <para>Compresses files using the Burrows-Wheeler block sorting text
171 compression algorithm with Huffman coding; the compression rate is
172 better than that achieved by more conventional compressors using
173 <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
174 <indexterm zone="ch-system-bzip2 bzip2">
175 <primary sortas="b-bzip2">bzip2</primary>
176 </indexterm>
177 </listitem>
178 </varlistentry>
179
180 <varlistentry id="bzip2recover">
181 <term><command>bzip2recover</command></term>
182 <listitem>
183 <para>Tries to recover data from damaged bzipped files</para>
184 <indexterm zone="ch-system-bzip2 bzip2recover">
185 <primary sortas="b-bzip2recover">bzip2recover</primary>
186 </indexterm>
187 </listitem>
188 </varlistentry>
189
190 <varlistentry id="bzless">
191 <term><command>bzless</command></term>
192 <listitem>
193 <para>Runs <command>less</command> on bzipped files</para>
194 <indexterm zone="ch-system-bzip2 bzless">
195 <primary sortas="b-bzless">bzless</primary>
196 </indexterm>
197 </listitem>
198 </varlistentry>
199
200 <varlistentry id="bzmore">
201 <term><command>bzmore</command></term>
202 <listitem>
203 <para>Runs <command>more</command> on bzipped files</para>
204 <indexterm zone="ch-system-bzip2 bzmore">
205 <primary sortas="b-bzmore">bzmore</primary>
206 </indexterm>
207 </listitem>
208 </varlistentry>
209
210 <varlistentry id="libbz2">
211 <term><filename class="libraryfile">libbz2*</filename></term>
212 <listitem>
213 <para>The library implementing lossless, block-sorting data
214 compression, using the Burrows-Wheeler algorithm</para>
215 <indexterm zone="ch-system-bzip2 libbz2">
216 <primary sortas="c-libbz2*">libbz2*</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.