glfs/general/genlib/libusb.xml
Randy McMurchy 1f3b7a775a Added an FTP download URL, a note about running the test suite and additional explanatory text to the libusb instructions
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@5436 af4574ff-66df-0310-9fd7-8a98e5e911e0
2005-12-16 17:18:12 +00:00

199 lines
7.2 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY libusb-download-http "http://prdownloads.sourceforge.net/libusb/libusb-&libusb-version;.tar.gz">
<!ENTITY libusb-download-ftp "ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/libusb-&libusb-version;.tar.gz">
<!ENTITY libusb-md5sum "c6062b29acd2cef414bcc34e0decbdd1">
<!ENTITY libusb-size "375 KB">
<!ENTITY libusb-buildsize "7.4 MB (additional 1.3 MB to install documentation)">
<!ENTITY libusb-time "0.1 SBU">
]>
<sect1 id="libusb" xreflabel="libusb-&libusb-version;">
<?dbhtml filename="libusb.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
<keywordset>
<keyword role="package">libusb-&libusb-version;.tar</keyword>
<keyword role="ftpdir">libusb</keyword>
</keywordset>
</sect1info>
<title>libusb-&libusb-version;</title>
<indexterm zone="libusb">
<primary sortas="a-Libusb">Libusb</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to libusb</title>
<para>The <application>libusb</application> package contains a library
used by some applications for USB device access.</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&libusb-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&libusb-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &libusb-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &libusb-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &libusb-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &libusb-time;</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">libusb Dependencies</bridgehead>
<bridgehead renderas="sect4">Optional (Required to Build the HTML User
Manual)</bridgehead>
<para role="optional"><xref linkend="openjade"/> and
<ulink url="http://www.docbook.org/sgml/4.2/index.html"> DocBOOK SGML
DTD-4.2</ulink></para>
<bridgehead renderas="sect4">Optional (Required to Build the API
Documentation)</bridgehead>
<para role="optional"><xref linkend="doxygen"/> and
<ulink url="http://www.graphviz.org/">GraphViz</ulink></para>
</sect2>
<sect2 role="installation">
<title>Installation of libusb</title>
<para>Install <application>libusb</application> by running the following
commands:</para>
<screen><userinput>./configure --prefix=/usr --disable-build-docs &amp;&amp;
make</userinput></screen>
<para>If you wish to build the API documentation (see the required
dependencies), issue the following command:</para>
<screen><userinput>make apidox</userinput></screen>
<para>To test the results, issue <command>make -k check</command>.</para>
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install</userinput></screen>
<para>If you built the HTML user manual (by having the required
dependencies installed and removing the
<parameter>--disable-build-docs</parameter> parameter from the
<command>configure</command> command), install it using the following
commands as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/html &amp;&amp;
install -v -m644 doc/html/* /usr/share/doc/libusb-&libusb-version;/html</userinput></screen>
<para>If you built the API documentation, install it using the following
commands as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/apidocs &amp;&amp;
install -v -m644 apidocs/html/* \
/usr/share/doc/libusb-&libusb-version;/apidocs</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><parameter>--disable-build-docs</parameter>: This switch avoids
building the HTML user manual.</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Libusb</title>
<para><application>libusb</application> requires the
<systemitem class="filesystem">usbfs</systemitem> kernel filesystem
to be mounted on <filename class="directory">/proc/bus/usb</filename>.
Applications require the files in this directory to be accessible to the user,
sometimes for both reading and writing. To restrict access to USB devices,
ensure the <systemitem class="filesystem">usb</systemitem> group exits
on your system. If necessary, create the <systemitem
class="filesystem">usb</systemitem> group using the following command:</para>
<screen role='root'><userinput>groupadd -g 14 usb</userinput></screen>
<para id="libusb-kernel">Ensure that you have compiled the <quote>USB device
filesystem</quote> directly into the kernel or compiled it as a module
(listing the resulting <quote>usbcore</quote> module in the
<filename>/etc/sysconfig/modules</filename> file). You should also have an
entry similar to the line below in your <filename>/etc/fstab</filename>
file:</para>
<indexterm zone="libusb libusb-kernel">
<primary sortas="d-USB-device-filesystem">USB device filesystem</primary>
</indexterm>
<screen><literal>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</literal></screen>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Program</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directory</segtitle>
<seglistitem>
<seg>usb-config</seg>
<seg>libusb.[so,a] and libusbpp.[so,a]</seg>
<seg>/usr/share/doc/libusb-&libusb-version;</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="usb-config">
<term><command>usb-config</command></term>
<listitem>
<para>is a script that provides the right compiler and linker
flags for programs using
<filename class='libraryfile'>libusb</filename>.</para>
<indexterm zone="libusb usb-config">
<primary sortas="b-usb-config">usb-config</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libusb-lib">
<term><filename class='libraryfile'>libusb.[so,a]</filename></term>
<listitem>
<para> libraries contain C functions for accessing
USB hardware.</para>
<indexterm zone="libusb libusb-lib">
<primary sortas="c-libusb">libusb.[so,a]</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>