aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/bzip2.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter05/bzip2.xml')
-rw-r--r--chapter05/bzip2.xml35
1 files changed, 28 insertions, 7 deletions
diff --git a/chapter05/bzip2.xml b/chapter05/bzip2.xml
index 4f1e3aab9..828b7fc0f 100644
--- a/chapter05/bzip2.xml
+++ b/chapter05/bzip2.xml
@@ -43,12 +43,26 @@
<sect2 role="installation">
<title>Installation of Bzip2</title>
+ <para>Apply a patch that will install the documentation for this
+ package:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
+
+ <para>The following command ensures installation of symbolic links are
+ relative:</para>
+
+<screen><userinput remap="pre">sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile</userinput></screen>
+
+ <para>Ensure the man pages are installed into the correct location:</para>
+
+<screen><userinput remap="pre">sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile</userinput></screen>
+
<para>The Bzip2 package does not contain a <command>configure</command>
script. There are two <filename>Makefile</filename>, one for the shared
library, and the other for the static library. Since we need both, We
do the compilation in two stages. First the shared library:</para>
-<screen><userinput remap="make">make -f Makefile-libbz2_so
+<screen><userinput remap="make">make CC=$LFS_TGT-gcc -f Makefile-libbz2_so
make clean</userinput></screen>
<variablelist>
@@ -69,20 +83,27 @@ make clean</userinput></screen>
<para>Compile and test the package with:</para>
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput remap="make">make CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib</userinput></screen>
<para>Install the package:</para>
-<screen><userinput remap="install">make PREFIX=/tools install
-cp -v bzip2-shared /tools/bin/bzip2
-cp -av libbz2.so* /tools/lib
-ln -sv libbz2.so.1.0 /tools/lib/libbz2.so</userinput></screen>
+<screen><userinput remap="install">make PREFIX=$LFS/usr install</userinput></screen>
+
+ <para>Install the shared <command>bzip2</command> binary into the
+ <filename class="directory">/bin</filename> directory, make some necessary
+ symbolic links, and clean up:</para>
+
+<screen><userinput remap="install">cp -v bzip2-shared $LFS/bin/bzip2
+cp -av libbz2.so* $LFS/lib
+ln -sv ../../lib/libbz2.so.1.0 $LFS/usr/lib/libbz2.so
+rm -v $LFS/usr/bin/{bunzip2,bzcat,bzip2}
+ln -sv bzip2 $LFS/bin/bunzip2
+ln -sv bzip2 $LFS/bin/bzcat</userinput></screen>
</sect2>
<sect2 role="content">
<title/>
-
<para>Details on this package are located in
<xref linkend="contents-bzip2" role="."/></para>