<?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 libevdev-version "1.3.2">

  <!ENTITY libevdev-download-http "http://www.freedesktop.org/software/libevdev/libevdev-&libevdev-version;.tar.xz">
  <!ENTITY libevdev-download-ftp  " ">
  <!ENTITY libevdev-md5sum        "80c7b490bf3e7ec8e8b60d4fb307b664">
  <!ENTITY libevdev-size          "388 KB">
  <!ENTITY libevdev-buildsize     "7.1 MB (with tests)">
  <!ENTITY libevdev-time          "0.1 SBU (0.3 SBU with tests)">
]>

  <!-- Begin Xorg Libevdev Driver -->
  <sect2 id="libevdev" xreflabel="Libevdev-&libevdev-version;">

    <title>Libevdev &libevdev-version;</title>

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

    <sect3 role="package">
      <title>Introduction to Libevdev</title>

      <para>
        The <application>Libevdev</application> package contains common
        functions for Xorg input drivers. 
      </para>

      &lfs77_checked;

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

      <bridgehead renderas="sect4">Libevdev Dependencies</bridgehead>

      <bridgehead renderas="sect5">Required</bridgehead>
      <para role="required">
        <xref linkend="python2"/> or <xref linkend="python3"/>
      </para>

      <bridgehead renderas="sect5">Optional</bridgehead>
      <para role="optional">
        <xref linkend="check"/>,
        <xref linkend="doxygen"/>, and
        <xref linkend="valgrind"/>
      </para>

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

    <sect3 role="kernel" id="libevdev-kernel">
      <title>Kernel Configuration</title>

    <para>
      Enable the following options in the kernel configuration and recompile the
      kernel if necessary:
    </para>

<screen><literal>Device Drivers  ---&gt;
  Input device support ---&gt;
    &lt;*&gt; Generic input layer (needed for...) [CONFIG_INPUT]
    &lt;*&gt;   Event interface                   [CONFIG_INPUT_EVDEV]
    [*]   Miscellaneous devices  ---&gt;       [CONFIG_INPUT_MISC]
      &lt;*&gt;    User level driver support      [CONFIG_INPUT_UINPUT]</literal></screen>

      <indexterm zone="libevdev libevdev-kernel">
        <primary sortas="d-libevdev">libevdev</primary>
      </indexterm>
    </sect3>

    <sect3 role="installation">
      <title>Installation of Libevdev</title>

      <para>If <xref linkend="valgrind"/> is installed and tests are
      going to be run, fix a testing problem:</para>

<screen><userinput>cat &gt;&gt; test/valgrind.suppressions &lt;&lt; "EOF"
{
   &lt;timer_create@@GLIBC_2.3.3-2&gt;
   Memcheck:Param
   timer_create(evp)
   fun:timer_create@@GLIBC_2.3.3
   fun:check_get_clockid
   fun:srunner_run
   fun:main
}
EOF</userinput></screen>

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

<screen><userinput>./configure $XORG_CONFIG &amp;&amp;
make</userinput></screen>

      <para>
        If you have the optional <xref linkend='check'/> package installed,
        the regression tests can be run as the <systemitem 
        class="username">root</systemitem> user with 
        <userinput>make check</userinput>.
      </para>

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

<screen role="root"><userinput>make install</userinput></screen>
    </sect3>

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

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

        <seglistitem>
          <seg>
            mouse-dpi-tool and touchpad-edge-detector
          </seg>
          <seg>
            libevdev.so
          </seg>
          <seg>
            $XORG_PREFIX/include/libevdev-1.0
          </seg>
        </seglistitem>
      </segmentedlist>

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

        <varlistentry id="mouse-dpi-tool">
          <term><command>mouse-dpi-tool</command></term>
          <listitem>
            <para>
              is a tool to estimate the resolution of a mouse.
            </para>
            <indexterm zone="libevdev mouse-dpi-tool">
              <primary sortas="b-mouse-dpi-tool">mouse-dpi-tool</primary>
            </indexterm>
          </listitem>
        </varlistentry>

        <varlistentry id="libevdev-lib">
          <term><filename class="libraryfile">libevdev.so</filename></term>
          <listitem>
            <para>
              is a library of Xorg driver input functions.
            </para>
            <indexterm zone="libevdev libevdev-lib">
              <primary sortas="c-libevdev-lib">ebvdev.so</primary>
            </indexterm>
          </listitem>
        </varlistentry>

      </variablelist>

    </sect3>

  </sect2>
  <!-- End Xorg Evdev Driver -->
