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-zlib" role="wrap">
  <?dbhtml filename="zlib.html"?>

  <title>Zlib-&zlib-version;</title>

  <indexterm zone="ch-system-zlib">
    <primary sortas="a-Zlib">Zlib</primary>
  </indexterm>

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

    <para>The Zlib package contains compression and decompression routines
    used by some programs.</para>

  </sect2>

  &env-target;

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

    <para os="p1">This patch will add -fPIC to our build and allow us to build
    a static and shared library at the same time:</para>

<screen os="p2"><userinput>patch -Np1 -i ../&zlib-fpic-patch;</userinput></screen>

    <para os="a">Prepare Zlib for compilation:</para>

<screen os="b"><userinput>./configure --prefix=/usr --shared</userinput></screen>

    <para os="c">Compile the package:</para>

<screen os="d"><userinput>make</userinput></screen>

    <para os="e">Install the package:</para>

<screen os="f"><userinput>make prefix=${CLFS}/usr install</userinput></screen>

    <para os="g">The previous command installed a <filename
   class="extension">.so</filename> file in <filename
   class="directory">${CLFS}/usr/lib</filename>. We will move it into
    <filename class="directory">${CLFS}/lib</filename> and then relink it
    to <filename class="directory">${CLFS}/usr/lib</filename>:</para>

<screen os="h"><userinput>mv -v ${CLFS}/usr/lib/libz.so.* ${CLFS}/lib
ln -sfv ../../lib/libz.so.1 ${CLFS}/usr/lib/libz.so</userinput></screen>

    <para os="i">Now we fix the permissions on the static library:</para>

<screen os="j"><userinput>chmod -v 644 ${CLFS}/usr/lib/libz.a</userinput></screen>

  </sect2>

  <sect2 id="contents-zlib" role="content">
    <title>Contents of Zlib</title>

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

      <seglistitem>
        <seg>libz.[a,so]</seg>
      </seglistitem>
    </segmentedlist>

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

      <varlistentry id="libz">
        <term><filename class="libraryfile">libz</filename></term>
        <listitem>
          <para>Contains compression and decompression
          functions used by some programs</para>
          <indexterm zone="ch-system-zlib libz">
            <primary sortas="c-libz">libz</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>