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

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

  <title>Sed-&sed-version;</title>

  <indexterm zone="ch-system-sed">
    <primary sortas="a-Sed">Sed</primary>
  </indexterm>

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

    <para>Sed 软件包包含一个流编辑器。</para>

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

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

  </sect2>

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

    <para>首先修复 LFS 环境中的一个问题，并删除一个失败的测试：</para>

<screen><userinput remap="pre">sed -i 's/usr/tools/'                 build-aux/help2man
sed -i 's/testsuite.panic-tests.sh//' Makefile.in</userinput></screen>

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

<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
<!--
    <variablelist>
      <title>The meaning of the new configure option:</title>

      <varlistentry>
        <term><parameter>-i -htmldir</parameter></term>
        <listitem>
          <para>This sets the installation directory for the HTML documentation.</para>
        </listitem>
      </varlistentry>
    </variablelist>
-->
    <para>编译该软件包，并生成 HTML 文档：</para>

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

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

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

    <para>安装该软件包及其文档：</para>

<screen><userinput remap="install">make install
install -d -m755           /usr/share/doc/sed-&sed-version;
install -m644 doc/sed.html /usr/share/doc/sed-&sed-version;</userinput></screen>

  </sect2>

  <sect2 id="contents-sed" role="content">
    <title>Sed 的内容</title>

    <segmentedlist>
      <segtitle>安装的程序</segtitle>
      <segtitle>安装的目录</segtitle>

      <seglistitem>
        <seg>sed</seg>
        <seg>/usr/share/doc/sed-&sed-version;</seg>
      </seglistitem>
    </segmentedlist>

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

      <varlistentry id="sed">
        <term><command>sed</command></term>
        <listitem>
          <para>一次性过滤和转换文本文件</para>
          <indexterm zone="ch-system-sed sed">
            <primary sortas="b-sed">sed</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
