glfs/general/genlib/libusb.xml
Bruce Dubbs 52d29f7a42 XML Updates to Part III from DJ
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2304 af4574ff-66df-0310-9fd7-8a98e5e911e0
2004-06-12 22:56:28 +00:00

113 lines
5.4 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/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 " ">
<!ENTITY libusb-size "314 KB">
<!ENTITY libusb-buildsize "2.1 MB">
<!ENTITY libusb-time "0.03 SBU">
]>
<sect1 id="libusb" xreflabel="libusb-&libusb-version;">
<?dbhtml filename="libusb.html"?>
<title>libusb-&libusb-version;</title>
<sect2>
<title>Introduction to <application>libusb</application></title>
<para>The <application>libusb</application> package contains a library
used by some applications for <acronym>USB</acronym> device access.</para>
<sect3><title>Package information</title>
<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 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>
</sect3>
<sect3><title><application>libusb</application> dependencies</title>
<sect4><title>Optional</title>
<para><xref linkend="openjade"/> and <xref linkend="sgml-dtd-3"/></para></sect4>
</sect3>
</sect2>
<sect2>
<title>Installation of <application>libusb</application></title>
<para>Install <application>libusb</application> by running the following commands:</para>
<screen><userinput><command>./configure --prefix=/usr --disable-build-docs &amp;&amp;
make &amp;&amp;
make install</command></userinput></screen>
</sect2>
<sect2>
<title>Command explanations</title>
<para><parameter>--disable-build-docs</parameter>: This switch turns off
the default enabled building of documentation since it requires
<application>OpenJade</application>.</para>
</sect2>
<sect2>
<title>Configuring <application>libusb</application></title>
<!-- To be reviewed when hotplug enters the LFS book -->
<para>libusb requires the usbfs 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.</para>
<para>To restrict access to <acronym>USB</acronym> devices, create the
usb group:</para>
<screen><userinput><command>groupadd -g 15 usb</command></userinput></screen>
<para>To get usbfs mounted on boot, we will create a special init script,
because just putting an extra line into
<filename>/etc/fstab</filename> does not work for those who compiled
"USB device filesystem" as a kernel module.
Install <filename>/etc/rc.d/init.d/usb</filename>
init script included in the
<xref linkend="intro-important-bootscripts"/> package.</para>
<screen><userinput><command>make install-usb</command></userinput></screen>
</sect2>
<sect2>
<title>Contents</title>
<para>The <application>libusb</application> package contains
<filename class="libraryfile">libusb</filename> libraries,
the <filename>/usr/include/usb.h</filename> header,
and a <command>usb-config</command> script.</para>
</sect2>
<sect2><title>Description</title>
<sect3><title>libusb libraries</title>
<para><filename class="libraryfile">libusb</filename> libraries contain C functions for
accessing <acronym>USB</acronym> hardware.</para></sect3>
<sect3><title>usb-config</title>
<para>The <command>usb-config</command> script provides the right
compiler and linker flags for programs using
this library.</para></sect3>
</sect2>
</sect1>