<?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;

  <!ENTITY libgcrypt-download-http " ">
  <!ENTITY libgcrypt-download-ftp  "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-&libgcrypt-version;.tar.bz2">
  <!ENTITY libgcrypt-md5sum        "b54395a93cb1e57619943c082da09d5f">
  <!ENTITY libgcrypt-size          "2.4 MB">
  <!ENTITY libgcrypt-buildsize     "38 MB (additional 7 MB for docs)">
  <!ENTITY libgcrypt-time          "0.3 SBU (additional 0.1 SBU for docs and
                                    0.8 SBU for tests)">
]>

<sect1 id="libgcrypt" xreflabel="libgcrypt-&libgcrypt-version;">
  <?dbhtml filename="libgcrypt.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-20 19:04:13 -0500 (Fri, 20 Feb 2015) $</date>
  </sect1info>

  <title>libgcrypt-&libgcrypt-version;</title>

  <indexterm zone="libgcrypt">
    <primary sortas="a-libgcrypt">libgcrypt</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to libgcrypt</title>

    <para>
      The <application>libgcrypt</application> package contains a general
      purpose crypto library based on the code used in
      <application>GnuPG</application>. The library provides a high level
      interface to cryptographic building blocks using an extendable and flexible
      API.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&libgcrypt-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&libgcrypt-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &libgcrypt-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &libgcrypt-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &libgcrypt-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &libgcrypt-time;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">libgcrypt Dependencies</bridgehead>

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      <xref linkend="libgpg-error"/>
    </para>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="libcap-pam"/> and
      <xref linkend="pth"/>,
      <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
    </para>

    <para condition="html" role="usernotes">User Notes:
      <ulink url="&blfs-wiki;/libgcrypt"/>
    </para>
  </sect2>

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

    <para>
      Install <application>libgcrypt</application> by running the
      following commands:
    </para>

<screen><userinput>./configure --prefix=/usr &amp;&amp;
make</userinput></screen>

    <para>
      Only <command>info</command> documentation is shipped in the package
      tarball. If you wish to build alternate formats of the documentation,
      (you must have <xref linkend="texlive"/> installed to build the PDF
      and PostScript documentation), then issue the following commands:
    </para>

<screen><userinput>make -j1 -C doc pdf ps html &amp;&amp;
makeinfo --html --no-split -o doc/gcrypt_nochunks.html doc/gcrypt.texi &amp;&amp;
makeinfo --plaintext       -o doc/gcrypt.txt           doc/gcrypt.texi</userinput></screen>

    <para>
      To test the results, issue: <command>make check</command>.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make install &amp;&amp;
install -v -dm755   /usr/share/doc/libgcrypt-&libgcrypt-version; &amp;&amp;
install -v -m644    README doc/{README.apichanges,fips*,libgcrypt*} \
                    /usr/share/doc/libgcrypt-&libgcrypt-version;</userinput></screen>

    <para>
      If you built the additional documentation, install it by issuing the
      following commands as the <systemitem class="username">root</systemitem>
      user:
    </para>

<screen role="root"><userinput>install -v -dm755   /usr/share/doc/libgcrypt-&libgcrypt-version;/html &amp;&amp;
install -v -m644 doc/gcrypt.html/* \
                    /usr/share/doc/libgcrypt-&libgcrypt-version;/html &amp;&amp;
install -v -m644 doc/gcrypt_nochunks.html \
                    /usr/share/doc/libgcrypt-&libgcrypt-version; &amp;&amp;
install -v -m644 doc/gcrypt.{pdf,ps,dvi,txt,texi} \
                    /usr/share/doc/libgcrypt-&libgcrypt-version;</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <option>--with-capabilities</option>: This option enables libcap2 support.
    </para>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Library</segtitle>
      <segtitle>Installed Directory</segtitle>

      <seglistitem>
        <seg>
          dumpsexp, hmac256, libgcrypt-config, and mpicalc
        </seg>
        <seg>
          libgcrypt.so
        </seg>
        <seg>
          /usr/share/doc/libgcrypt-&libgcrypt-version;
        </seg>
      </seglistitem>
    </segmentedlist>

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

      <varlistentry id="libgcrypt-lib">
        <term><filename class="libraryfile">libgcrypt.so</filename></term>
        <listitem>
          <para>
            contains the cryptographic API functions.
          </para>
          <indexterm zone="libgcrypt libgcrypt-lib">
            <primary sortas="c-libgcrypt">libgcrypt.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
