aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/bzip2.xml
diff options
context:
space:
mode:
authorPierre Labastie <pieere@linuxfromscratch.org>2020-05-03 21:02:51 +0000
committerPierre Labastie <pieere@linuxfromscratch.org>2020-05-03 21:02:51 +0000
commitefcb3933433838b71f3a4a53ec1ac6d899aaec0b (patch)
treef0b1fb24d5ac7ebb93cc2deddefbc16938ea49d0 /chapter05/bzip2.xml
parent9d719e24c33f9a2ecf8a5582cd811c43a8fa46c2 (diff)
Make the new book
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross-chap5@11831 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
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>