glfs/general/genlib/libusb.xml
Manuel Canales Esparcia ff769b8c61 Updated the XML sources to use DocBook XML DTD-4.4.
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3656 af4574ff-66df-0310-9fd7-8a98e5e911e0
2005-04-03 20:52:42 +00:00

182 lines
6.4 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 " ">
<!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.14 SBU (additional 0.08 SBU to build documentation)">
]>
<sect1 id="libusb" xreflabel="libusb-&libusb-version;">
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="libusb.html"?>
<title>libusb-&libusb-version;</title>
<indexterm zone="libusb">
<primary sortas="a-Libusb">Libusb</primary>
</indexterm>
<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 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>
</sect3>
<sect3><title><application>libusb</application> dependencies</title>
<sect4><title>Optional (required to build the <acronym>HTML</acronym> user
manual)</title>
<para><xref linkend="openjade"/> and
<ulink url="http://www.docbook.org/sgml/4.2/index.html"> DocBOOK SGML
DTD-4.2</ulink></para>
</sect4>
<sect4><title>Optional (required to build the <acronym>API</acronym>
documentation)</title>
<para><xref linkend="doxygen"/> and
<ulink url="http://www.graphviz.org/">GraphViz</ulink></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</command></userinput></screen>
<para>If you wish to build the <acronym>API</acronym> documentation, issue
the following command:</para>
<screen><userinput><command>make apidox</command></userinput></screen>
<para>Now, as the root user:</para>
<screen><userinput role='root'><command>make install</command></userinput></screen>
<para>If you built the <acronym>HTML</acronym> user manual, install it using
the following commands as the root user:</para>
<screen><userinput role='root'><command>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</command></userinput></screen>
<para>If you built the <acronym>API</acronym> documentation, install it using
the following commands as the root user:</para>
<screen><userinput role='root'><command>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</command></userinput></screen>
</sect2>
<sect2>
<title>Command explanations</title>
<para><option>--disable-build-docs</option>: This switch avoids building the
<acronym>HTML</acronym> user manual. If you wish to build the user manual, you
may need to remove the <application>OpenSP</application> catalog definitions
from the system <acronym>SGML</acronym> catalogs. Use the following command
before building the package to accomplish this:</para>
<screen><userinput role='root'><command>sed -i.orig \
-e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \
/etc/sgml/catalog \
/etc/sgml/sgml-docbook.cat</command></userinput></screen>
</sect2>
<sect2>
<title>Configuring <application>libusb</application></title>
<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. To restrict access to <acronym>USB</acronym> devices,
ensure the usb group exits on your system. If necessary, create the usb group
using the following command:</para>
<screen><userinput role='root'><command>groupadd -g 14 usb</command></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><userinput role='root'>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</userinput></screen>
</sect2>
<sect2>
<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"?>
<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
<acronym>USB</acronym> hardware.</para>
<indexterm zone="libusb libusb-lib">
<primary sortas="c-libusb">libusb.[so,a]</primary>
</indexterm></listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>