bzip2-inst.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <sect2>
  2. <title>Installation of Bzip2</title>
  3. <para>
  4. Install Bzip2 by running the following commands:
  5. </para>
  6. <blockquote><literallayout>
  7. <userinput>make -f Makefile-libbz2_so &amp;&amp;</userinput>
  8. <userinput>make bzip2recover libbz2.a &amp;&amp;</userinput>
  9. <userinput>cp bzip2-shared /bin/bzip2 &amp;&amp;</userinput>
  10. <userinput>cp bzip2recover /bin &amp;&amp;</userinput>
  11. <userinput>cp bzip2.1 /usr/share/man/man1 &amp;&amp;</userinput>
  12. <userinput>cp bzlib.h /usr/include &amp;&amp;</userinput>
  13. <userinput>cp -a libbz2.so* libbz2.a /lib &amp;&amp;</userinput>
  14. <userinput>rm /usr/lib/libbz2.a &amp;&amp;</userinput>
  15. <userinput>cd /bin &amp;&amp;</userinput>
  16. <userinput>rm bunzip2 &amp;&amp; ln -s bzip2 bunzip2
  17. &amp;&amp;</userinput>
  18. <userinput>rm bzcat &amp;&amp; ln -s bzip2 bzcat
  19. &amp;&amp;</userinput>
  20. <userinput>cd /usr/share/man/man1 &amp;&amp;</userinput>
  21. <userinput>ln -s bzip2.1 bunzip2.1 &amp;&amp;</userinput>
  22. <userinput>ln -s bzip2.1 bzcat.1 &amp;&amp;</userinput>
  23. <userinput>ln -s bzip2.1 bzip2recover.1</userinput>
  24. </literallayout></blockquote>
  25. <para>
  26. Although it's not strictly a part of a basic LFS system it's worth
  27. mentioning that you can download a patch for Tar which enables the tar
  28. program to compress and uncompress using bzip2/bunzip2 easily. With a
  29. plain tar you'll have to use constructions like bzcat file.tar.bz|tar
  30. xv or tar --use-compress-prog=bunzip2 -xvf file.tar.bz2 to use bzip2 and
  31. bunzip2 with tar. This patch gives you the -y option so you can unpack a
  32. Bzip2 archive with tar xvfy file.tar.bz2. Applying this patch will be
  33. mentioned later on when you re-install the Tar package.
  34. </para>
  35. </sect2>