<?xml version="1.0" encoding="UTF-8"?>
<!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-gdbm" role="wrap">
  <?dbhtml filename="gdbm.html"?>

  <sect1info condition="script">
    <productname>gdbm</productname>
    <productnumber>&gdbm-version;</productnumber>
    <address>&gdbm-url;</address>
  </sect1info>

  <title>GDBM-&gdbm-version;</title>

  <indexterm zone="ch-system-gdbm">
    <primary sortas="a-Gdbm">GDBM</primary>
  </indexterm>

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

    <!--para>The GDBM package contains the GNU Database Manager.  It is a library
    of database functions that use extensible hashing and work similar to the
    standard UNIX dbm.  The library provides primitives for storing key/data
    pairs, searching and retrieving the data by its key and deleting a key
    along with its data. </para-->
    <para>GDBM 软件包包含 GNU 数据库管理器。
		它是一个使用可扩展散列的数据库函数库，工作方法和标准 UNIX dbm 类似。
		该库提供用于存储键值对、通过键搜索和获取数据，
		以及删除键和对应数据的原语。</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>&gdbm-ch6-sbu;</seg>
        <seg>&gdbm-ch6-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>安装 GDBM</title>

    <para>准备安装 GDBM：</para>

<screen><userinput remap="configure">./configure --prefix=/usr \
            --disable-static \
            --enable-libgdbm-compat</userinput></screen>

    <variablelist>
      <title>配置选项的含义：</title>

      <varlistentry>
        <term><envar>--enable-libgdbm-compat</envar></term>
        <listitem>
          <para>该选项启用 libgdbm 兼容性库的构建，
          因为 LFS 之外的一些软件包需要它提供的老式 DBM 子程序。</para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>编译该软件包：</para>

<screen><userinput remap="make">make</userinput></screen>

    <para>运行以下命令以测试编译结果：</para>

<screen><userinput remap="test">make check</userinput></screen>

    <para>安装该软件包：</para>

<screen><userinput remap="install">make install</userinput></screen>

  </sect2>

  <sect2 id="contents-gdbm" role="content">
    <title>GDBM 的内容</title>

    <segmentedlist>
      <segtitle>安装的程序</segtitle>
      <segtitle>安装的库</segtitle>

      <seglistitem>
        <seg>gdbm_dump, gdbm_load, 以及 gdbmtool</seg>
        <seg>libgdbm.so 和 libgdbm_compat.so</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">简要描述</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="gdbm_dump">
        <term><command>gdbm_dump</command></term>
        <listitem>
          <para>将 GDBM 数据库转储到文件</para>
          <indexterm zone="ch-system-gdbm gdbm_dump">
            <primary sortas="b-gdbm_dump">gdbm_dump</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gdbm_load">
        <term><command>gdbm_load</command></term>
        <listitem>
          <para>从转储文件重建 GDBM 数据库</para>
          <indexterm zone="ch-system-gdbm gdbm_load">
            <primary sortas="b-gdbm_load">gdbm_load</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gdbmtool">
        <term><command>gdbmtool</command></term>
        <listitem>
          <para>测试和修改 GDBM 数据库</para>
          <indexterm zone="ch-system-gdbm gdbmtool">
            <primary sortas="b-gdbmtool">gdbmtool</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libgdbm">
        <term><filename class="libraryfile">libgdbm</filename></term>
        <listitem>
          <para>包含用于操作散列数据库的函数</para>
          <indexterm zone="ch-system-gdbm libgdbm">
            <primary sortas="c-libgdbm">libgdbm</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libgdbm_compat">
        <term><filename class="libraryfile">libgdbm_compat</filename></term>
        <listitem>
          <para>包含老式 DBM 函数的兼容性库</para>
          <indexterm zone="ch-system-gdbm libgdbm_compat">
            <primary sortas="c-libgdbm_compat">libgdbm_compat</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
