source: chapter06/bzip2.xml@ 8eb3fe4

multilib-10.1
Last change on this file since 8eb3fe4 was 8eb3fe4, checked in by Thomas Trepl <thomas@…>, 5 years ago

First apply of multilib-patch of April 1st, 2019

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11566 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 9.8 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 <sect1info condition="script">
12 <productname>bzip2</productname>
13 <productnumber>&bzip2-version;</productnumber>
14 <address>&bzip2-url;</address>
15 </sect1info>
16
17 <title>Bzip2-&bzip2-version;</title>
18
19 <indexterm zone="ch-system-bzip2">
20 <primary sortas="a-Bzip2">Bzip2</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Bzip2 package contains programs for compressing and decompressing
27 files. Compressing text files with <command>bzip2</command> yields a much
28 better compression percentage than with the traditional
29 <command>gzip</command>.</para>
30
31 <segmentedlist>
32 <segtitle>&buildtime;</segtitle>
33 <segtitle>&diskspace;</segtitle>
34
35 <seglistitem>
36 <seg>&bzip2-ch6-sbu;</seg>
37 <seg>&bzip2-ch6-du;</seg>
38 </seglistitem>
39 </segmentedlist>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of Bzip2</title>
45
46 <para>Apply a patch that will install the documentation for this package:</para>
47
48<screen><userinput remap="pre">patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
49
50 <para>The following command ensures installation of symbolic links are relative:</para>
51
52<screen><userinput remap="pre">sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile</userinput></screen>
53
54 <para>Ensure the man pages are installed into the correct location:</para>
55
56<screen><userinput remap="pre">sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile</userinput></screen>
57
58 <para>Prepare Bzip2 for compilation with:</para>
59
60<screen><userinput remap="make">make -f Makefile-libbz2_so
61make clean</userinput></screen>
62
63 <variablelist>
64 <title>The meaning of the make parameter:</title>
65
66 <varlistentry>
67 <term><parameter>-f Makefile-libbz2_so</parameter></term>
68 <listitem>
69 <para>This will cause Bzip2 to be built using a different
70 <filename>Makefile</filename> file, in this case the
71 <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
72 <filename class="libraryfile">libbz2.so</filename> library and links
73 the Bzip2 utilities against it.</para>
74 </listitem>
75 </varlistentry>
76
77 </variablelist>
78
79 <para>Compile and test the package:</para>
80
81<screen><userinput remap="make">make</userinput></screen>
82
83 <para>Install the programs:</para>
84
85<screen><userinput remap="install">make PREFIX=/usr install</userinput></screen>
86
87 <para>Install the shared <command>bzip2</command> binary into the
88 <filename class="directory">/bin</filename> directory, make
89 some necessary symbolic links, and clean up:</para>
90
91<screen><userinput remap="install">cp -v bzip2-shared /bin/bzip2
92cp -av libbz2.so* /lib
93ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
94rm -v /usr/bin/{bunzip2,bzcat,bzip2}
95ln -sv bzip2 /bin/bunzip2
96ln -sv bzip2 /bin/bzcat</userinput></screen>
97
98 </sect2>
99
100 <sect2 arch="multilib" role="installation">
101 <title>Installation of Bzip2 - 32-bit</title>
102
103 <para>Clean previous build:</para>
104
105<screen><userinput remap="pre">make clean</userinput></screen>
106
107 <para>Compile the package:</para>
108
109<screen><userinput remap="make">sed -e "s/^CC=.*/CC=gcc -m32/" \
110 -i Makefile{,-libbz2_so}
111make -f Makefile-libbz2_so
112make libbz2.a</userinput></screen>
113
114 <para>Install the package:</para>
115
116<screen><userinput remap="install">install -Dm755 libbz2.so.1.0.6 /usr/lib32/libbz2.so.1.0.6
117ln -sf libbz2.so.1.0.6 /usr/lib32/libbz2.so
118ln -sf libbz2.so.1.0.6 /usr/lib32/libbz2.so.1
119ln -sf libbz2.so.1.0.6 /usr/lib32/libbz2.so.1.0
120install -Dm644 libbz2.a /usr/lib32/libbz2.a</userinput></screen>
121
122 </sect2>
123
124 <sect2 arch="multilib" role="installation">
125 <title>Installation of Bzip2 - x32-bit</title>
126
127 <para>Clean previous build:</para>
128
129<screen><userinput remap="pre">make clean</userinput></screen>
130
131 <para>Compile the package:</para>
132
133<screen><userinput remap="make">sed -e "s/^CC=.*/CC=gcc -mx32/" \
134 -i Makefile{,-libbz2_so}
135make -f Makefile-libbz2_so
136make libbz2.a</userinput></screen>
137
138 <para>Install the package:</para>
139
140<screen><userinput remap="install">install -Dm755 libbz2.so.1.0.6 /usr/libx32/libbz2.so.1.0.6
141ln -sf libbz2.so.1.0.6 /usr/libx32/libbz2.so
142ln -sf libbz2.so.1.0.6 /usr/libx32/libbz2.so.1
143ln -sf libbz2.so.1.0.6 /usr/libx32/libbz2.so.1.0
144install -Dm644 libbz2.a /usr/libx32/libbz2.a</userinput></screen>
145
146 </sect2>
147
148 <sect2 id="contents-bzip2" role="content">
149 <title>Contents of Bzip2</title>
150
151 <segmentedlist>
152 <segtitle>Installed programs</segtitle>
153 <segtitle>Installed libraries</segtitle>
154 <segtitle>Installed directory</segtitle>
155
156 <seglistitem>
157 <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp (link to
158 bzdiff), bzdiff, bzegrep (link to bzgrep), bzfgrep (link to bzgrep),
159 bzgrep, bzip2, bzip2recover, bzless (link to bzmore), and bzmore</seg>
160 <seg>libbz2.{a,so}</seg>
161 <seg>/usr/share/doc/bzip2-&bzip2-version;</seg>
162 </seglistitem>
163 </segmentedlist>
164
165 <variablelist>
166 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
167 <?dbfo list-presentation="list"?>
168 <?dbhtml list-presentation="table"?>
169
170 <varlistentry id="bunzip2">
171 <term><command>bunzip2</command></term>
172 <listitem>
173 <para>Decompresses bzipped files</para>
174 <indexterm zone="ch-system-bzip2 bunzip2">
175 <primary sortas="b-bunzip2">bunzip2</primary>
176 </indexterm>
177 </listitem>
178 </varlistentry>
179
180 <varlistentry id="bzcat">
181 <term><command>bzcat</command></term>
182 <listitem>
183 <para>Decompresses to standard output</para>
184 <indexterm zone="ch-system-bzip2 bzcat">
185 <primary sortas="b-bzcat">bzcat</primary>
186 </indexterm>
187 </listitem>
188 </varlistentry>
189
190 <varlistentry id="bzcmp">
191 <term><command>bzcmp</command></term>
192 <listitem>
193 <para>Runs <command>cmp</command> on bzipped files</para>
194 <indexterm zone="ch-system-bzip2 bzcmp">
195 <primary sortas="b-bzcmp">bzcmp</primary>
196 </indexterm>
197 </listitem>
198 </varlistentry>
199
200 <varlistentry id="bzdiff">
201 <term><command>bzdiff</command></term>
202 <listitem>
203 <para>Runs <command>diff</command> on bzipped files</para>
204 <indexterm zone="ch-system-bzip2 bzdiff">
205 <primary sortas="b-bzdiff">bzdiff</primary>
206 </indexterm>
207 </listitem>
208 </varlistentry>
209
210 <varlistentry id="bzegrep">
211 <term><command>bzegrep</command></term>
212 <listitem>
213 <para>Runs <command>egrep</command> on bzipped files</para>
214 <indexterm zone="ch-system-bzip2 bzegrep">
215 <primary sortas="b-bzegrep">bzegrep</primary>
216 </indexterm>
217 </listitem>
218 </varlistentry>
219
220 <varlistentry id="bzfgrep">
221 <term><command>bzfgrep</command></term>
222 <listitem>
223 <para>Runs <command>fgrep</command> on bzipped files</para>
224 <indexterm zone="ch-system-bzip2 bzfgrep">
225 <primary sortas="b-bzfgrep">bzfgrep</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229
230 <varlistentry id="bzgrep">
231 <term><command>bzgrep</command></term>
232 <listitem>
233 <para>Runs <command>grep</command> on bzipped files</para>
234 <indexterm zone="ch-system-bzip2 bzgrep">
235 <primary sortas="b-bzgrep">bzgrep</primary>
236 </indexterm>
237 </listitem>
238 </varlistentry>
239
240 <varlistentry id="bzip2">
241 <term><command>bzip2</command></term>
242 <listitem>
243 <para>Compresses files using the Burrows-Wheeler block sorting text
244 compression algorithm with Huffman coding; the compression rate is
245 better than that achieved by more conventional compressors using
246 <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
247 <indexterm zone="ch-system-bzip2 bzip2">
248 <primary sortas="b-bzip2">bzip2</primary>
249 </indexterm>
250 </listitem>
251 </varlistentry>
252
253 <varlistentry id="bzip2recover">
254 <term><command>bzip2recover</command></term>
255 <listitem>
256 <para>Tries to recover data from damaged bzipped files</para>
257 <indexterm zone="ch-system-bzip2 bzip2recover">
258 <primary sortas="b-bzip2recover">bzip2recover</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
263 <varlistentry id="bzless">
264 <term><command>bzless</command></term>
265 <listitem>
266 <para>Runs <command>less</command> on bzipped files</para>
267 <indexterm zone="ch-system-bzip2 bzless">
268 <primary sortas="b-bzless">bzless</primary>
269 </indexterm>
270 </listitem>
271 </varlistentry>
272
273 <varlistentry id="bzmore">
274 <term><command>bzmore</command></term>
275 <listitem>
276 <para>Runs <command>more</command> on bzipped files</para>
277 <indexterm zone="ch-system-bzip2 bzmore">
278 <primary sortas="b-bzmore">bzmore</primary>
279 </indexterm>
280 </listitem>
281 </varlistentry>
282
283 <varlistentry id="libbz2">
284 <term><filename class="libraryfile">libbz2</filename></term>
285 <listitem>
286 <para>The library implementing lossless, block-sorting data
287 compression, using the Burrows-Wheeler algorithm</para>
288 <indexterm zone="ch-system-bzip2 libbz2">
289 <primary sortas="c-libbz2">libbz2</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
293
294 </variablelist>
295
296 </sect2>
297
298</sect1>
Note: See TracBrowser for help on using the repository browser.