%general-entities; ]> bzip2 &bzip2-version;
&bzip2-url;
Bzip2-&bzip2-version; Bzip2 tools <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../chapter06/bzip2.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> <seg>&bzip2-ch5-sbu;</seg> <seg>&bzip2-ch5-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>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 CC=$LFS_TGT-gcc -f Makefile-libbz2_so make clean The meaning of the make parameter: -f Makefile-libbz2_so This will cause Bzip2 to be built using a different Makefile file, in this case the Makefile-libbz2_so file, which creates a dynamic libbz2.so library and links the Bzip2 utilities against it. Compile and test the package with: make CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib Install the package: 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> </sect2> </sect1>