Subversion Repositories svn LFS-FR

Rev

Blame | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-bzip2" role="wrap">
  <?dbhtml filename="bzip2.html"?>

  <title>Bzip2-&bzip2-version;</title>

  <indexterm zone="ch-system-bzip2">
    <primary sortas="a-Bzip2">Bzip2</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>The Bzip2 package contains programs for compressing and
    decompressing files. Compressing text files with <command>bzip2</command>
    yields a much better compression percentage than with the traditional
    <command>gzip</command>.</para>

  </sect2>

  &env-target;

  <sect2 role="installation">
    <title>Installation of Bzip2</title>

    <para os="s1">Bzip2's default <filename>Makefile</filename> target
    automatically runs the testsuite as well. Disable the tests since they
    won't work on a multi-architecture build:</para>

<screen os="s2"><userinput>cp Makefile{,.orig}
sed -e "/^all:/s/ test//" Makefile.orig &gt; Makefile</userinput></screen>

    <para os="s3">By default Bzip2 creates some symlinks that use absolute
    pathnames. The following sed will cause them to be created with relative
    paths instead:</para>

<screen os="s4"><userinput>sed -i -e 's:ln -s -f $(PREFIX)/bin/:ln -s :' Makefile</userinput></screen>

    <para os="a">The Bzip2 package does not contain a <command>configure</command>
    script. Compile it with:</para>

<screen os="b"><userinput>make -f Makefile-libbz2_so CC="${CC}" AR="${AR}" RANLIB="${RANLIB}"
make clean</userinput></screen>

    <para os="c">The <parameter>-f</parameter> flag will cause Bzip2 to be built
    using a different <filename>Makefile</filename> file, in this case the
    <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
    <filename class="libraryfile">libbz2.so</filename> library and links the
    Bzip2 utilities against it.</para>

    <para os="d">Recompile the package using a non-shared library.</para>

<screen os="e"><userinput>make CC="${CC}" AR="${AR}" RANLIB="${RANLIB}"</userinput></screen>

    <para os="g">Install the programs:</para>

<screen os="h"><userinput>make PREFIX=${CLFS}/usr install</userinput></screen>

    <para os="i">Install the shared <command>bzip2</command> binary into the
    <filename class="directory">${CLFS}/bin</filename> directory, make
    some necessary symbolic links, and clean up:</para>

<screen os="j"><userinput>cp -v bzip2-shared ${CLFS}/bin/bzip2
cp -av libbz2.so* ${CLFS}/lib
ln -sfv ../../lib/libbz2.so.1.0 ${CLFS}/usr/lib/libbz2.so
rm -v ${CLFS}/usr/bin/{bunzip2,bzcat,bzip2}
ln -sfv bzip2 ${CLFS}/bin/bunzip2
ln -sfv bzip2 ${CLFS}/bin/bzcat</userinput></screen>

  </sect2>

  <sect2 id="contents-bzip2" role="content">
    <title>Contents of Bzip2</title>

    <segmentedlist>
      <segtitle>Installed programs</segtitle>
      <segtitle>Installed libraries</segtitle>

      <seglistitem>
        <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp (link to
        bzdiff), bzdiff, bzegrep (link to bzgrep), bzfgrep (link to bzgrep),
        bzgrep, bzip2, bzip2recover, bzless (link to bzmore), and bzmore</seg>
        <seg>libbz2.a, libbz2.so (link to libbz2.so.1.0), libbz2.so.1.0 (link to
        libbz2.so.&bzip2-version;), and libbz2.so.&bzip2-version;</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="bunzip2">
        <term><command>bunzip2</command></term>
        <listitem>
          <para>Decompresses bzipped files</para>
          <indexterm zone="ch-system-bzip2 bunzip2">
            <primary sortas="b-bunzip2">bunzip2</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzcat">
        <term><command>bzcat</command></term>
        <listitem>
          <para>Decompresses to standard output</para>
          <indexterm zone="ch-system-bzip2 bzcat">
            <primary sortas="b-bzcat">bzcat</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzcmp">
        <term><command>bzcmp</command></term>
        <listitem>
          <para>Runs <command>cmp</command> on bzipped files</para>
          <indexterm zone="ch-system-bzip2 bzcmp">
            <primary sortas="b-bzcmp">bzcmp</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzdiff">
        <term><command>bzdiff</command></term>
        <listitem>
          <para>Runs <command>diff</command> on bzipped files</para>
          <indexterm zone="ch-system-bzip2 bzdiff">
            <primary sortas="b-bzdiff">bzdiff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzgrep">
        <term><command>bzgrep</command></term>
        <listitem>
          <para>Runs <command>grep</command> on bzipped files</para>
          <indexterm zone="ch-system-bzip2 bzgrep">
            <primary sortas="b-bzgrep">bzgrep</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzegrep">
        <term><command>bzegrep</command></term>
        <listitem>
          <para>Runs <command>egrep</command> on bzipped files</para>
          <indexterm zone="ch-system-bzip2 bzegrep">
            <primary sortas="b-bzegrep">bzegrep</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzfgrep">
        <term><command>bzfgrep</command></term>
        <listitem>
          <para>Runs <command>fgrep</command> on bzipped files</para>
          <indexterm zone="ch-system-bzip2 bzfgrep">
            <primary sortas="b-bzfgrep">bzfgrep</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzip2">
        <term><command>bzip2</command></term>
        <listitem>
          <para>Compresses files using the Burrows-Wheeler block sorting text
          compression algorithm with Huffman coding; the compression rate is
          better than that achieved by more conventional compressors using
          <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
          <indexterm zone="ch-system-bzip2 bzip2">
            <primary sortas="b-bzip2">bzip2</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzip2recover">
        <term><command>bzip2recover</command></term>
        <listitem>
          <para>Tries to recover data from damaged bzipped files</para>
          <indexterm zone="ch-system-bzip2 bzip2recover">
            <primary sortas="b-bzip2recover">bzip2recover</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzless">
        <term><command>bzless</command></term>
        <listitem>
          <para>Runs <command>less</command> on bzipped files</para>
          <indexterm zone="ch-system-bzip2 bzless">
            <primary sortas="b-bzless">bzless</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="bzmore">
        <term><command>bzmore</command></term>
        <listitem>
          <para>Runs <command>more</command> on bzipped files</para>
          <indexterm zone="ch-system-bzip2 bzmore">
            <primary sortas="b-bzmore">bzmore</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libbz2">
        <term><filename class="libraryfile">libbz2*</filename></term>
        <listitem>
          <para>The library implementing lossless, block-sorting data
          compression, using the Burrows-Wheeler algorithm</para>
          <indexterm zone="ch-system-bzip2 libbz2">
            <primary sortas="c-libbz2*">libbz2*</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>