From efcb3933433838b71f3a4a53ec1ac6d899aaec0b Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 3 May 2020 21:02:51 +0000 Subject: Make the new book git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross-chap5@11831 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter05/bzip2.xml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'chapter05/bzip2.xml') 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 @@ Installation of Bzip2 + Apply a patch that will install the documentation for this + package: + +patch -Np1 -i ../&bzip2-docs-patch; + + The following command ensures installation of symbolic links are + relative: + +sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile + + Ensure the man pages are installed into the correct location: + +sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile + The Bzip2 package does not contain a configure script. There are two Makefile, 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: -make -f Makefile-libbz2_so +make CC=$LFS_TGT-gcc -f Makefile-libbz2_so make clean @@ -69,20 +83,27 @@ make clean Compile and test the package with: -make +make CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib Install the package: -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 +make PREFIX=$LFS/usr install + + Install the shared bzip2 binary into the + /bin directory, make some necessary + symbolic links, and clean up: + +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 - <para>Details on this package are located in <xref linkend="contents-bzip2" role="."/></para> -- cgit v1.2.3-54-g00ecf