1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY libusb-download-http "http://prdownloads.sourceforge.net/libusb/libusb-&libusb-version;.tar.gz">
|
---|
8 | <!ENTITY libusb-download-ftp " ">
|
---|
9 | <!ENTITY libusb-size "314 KB">
|
---|
10 | <!ENTITY libusb-buildsize "2.1 MB">
|
---|
11 | <!ENTITY libusb-time "0.03 SBU">
|
---|
12 | ]>
|
---|
13 |
|
---|
14 | <sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
---|
15 | <sect1info>
|
---|
16 | <othername>$LastChangedBy$</othername>
|
---|
17 | <date>$Date$</date>
|
---|
18 | </sect1info>
|
---|
19 | <?dbhtml filename="libusb.html"?>
|
---|
20 | <title>libusb-&libusb-version;</title>
|
---|
21 |
|
---|
22 | <sect2>
|
---|
23 | <title>Introduction to <application>libusb</application></title>
|
---|
24 |
|
---|
25 | <para>The <application>libusb</application> package contains a library
|
---|
26 | used by some applications for <acronym>USB</acronym> device access.</para>
|
---|
27 |
|
---|
28 | <sect3><title>Package information</title>
|
---|
29 | <itemizedlist spacing='compact'>
|
---|
30 | <listitem><para>Download (HTTP): <ulink url="&libusb-download-http;"/></para></listitem>
|
---|
31 | <listitem><para>Download (FTP): <ulink url="&libusb-download-ftp;"/></para></listitem>
|
---|
32 | <listitem><para>Download size: &libusb-size;</para></listitem>
|
---|
33 | <listitem><para>Estimated Disk space required: &libusb-buildsize;</para></listitem>
|
---|
34 | <listitem><para>Estimated build time: &libusb-time;</para></listitem></itemizedlist>
|
---|
35 | </sect3>
|
---|
36 |
|
---|
37 | <sect3><title><application>libusb</application> dependencies</title>
|
---|
38 | <sect4><title>Optional</title>
|
---|
39 | <para><xref linkend="openjade"/> and <xref linkend="sgml-dtd-3"/></para></sect4>
|
---|
40 | </sect3>
|
---|
41 |
|
---|
42 | </sect2>
|
---|
43 |
|
---|
44 | <sect2>
|
---|
45 | <title>Installation of <application>libusb</application></title>
|
---|
46 |
|
---|
47 | <para>Install <application>libusb</application> by running the following
|
---|
48 | commands:</para>
|
---|
49 |
|
---|
50 | <screen><userinput><command>./configure --prefix=/usr --disable-build-docs &&
|
---|
51 | make &&
|
---|
52 | make install</command></userinput></screen>
|
---|
53 |
|
---|
54 | </sect2>
|
---|
55 |
|
---|
56 | <sect2>
|
---|
57 | <title>Command explanations</title>
|
---|
58 |
|
---|
59 | <para><option>--disable-build-docs</option>: This switch avoids building the
|
---|
60 | documentation. If you wish to build the documentation , you may need to remove
|
---|
61 | the <application>OpenSP</application> catalog definitions from the system
|
---|
62 | <acronym>SGML</acronym> catalogs. Use the following commands before building
|
---|
63 | the package to accomplish this:</para>
|
---|
64 |
|
---|
65 | <screen><userinput><command>sed -i.orig -e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \
|
---|
66 | /etc/sgml/catalog &&
|
---|
67 | sed -i.orig -e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \
|
---|
68 | /etc/sgml/sgml-docbook.cat</command></userinput></screen>
|
---|
69 |
|
---|
70 | <para>If desired, restore the orginal <acronym>SGML</acronym> catalogs after
|
---|
71 | the build is complete using the following commands:</para>
|
---|
72 |
|
---|
73 | <screen><userinput><command>cp /etc/sgml/catalog.orig /etc/sgml/catalog &&
|
---|
74 | cp /etc/sgml/sgml-docbook.cat.orig /etc/sgml/sgml-docbook.cat</command></userinput></screen>
|
---|
75 |
|
---|
76 | </sect2>
|
---|
77 |
|
---|
78 | <sect2>
|
---|
79 | <title>Configuring <application>libusb</application></title>
|
---|
80 |
|
---|
81 | <!-- To be reviewed when hotplug enters the LFS book -->
|
---|
82 |
|
---|
83 | <para>libusb requires the usbfs kernel filesystem to be mounted on
|
---|
84 | <filename class="directory">/proc/bus/usb</filename>. Applications
|
---|
85 | require the files in this directory to be accessible to the user,
|
---|
86 | sometimes for both reading and writing.</para>
|
---|
87 |
|
---|
88 | <para>To restrict access to <acronym>USB</acronym> devices, create the
|
---|
89 | usb group:</para>
|
---|
90 |
|
---|
91 | <screen><userinput><command>groupadd -g 15 usb</command></userinput></screen>
|
---|
92 |
|
---|
93 | <para>Mount usbfs at system boot-up using a special init script, as putting an
|
---|
94 | extra line into <filename>/etc/fstab</filename> does not work for those who
|
---|
95 | compiled "USB device filesystem" as a kernel module. Install the
|
---|
96 | <filename>/etc/rc.d/init.d/usb</filename> init script included in the
|
---|
97 | <xref linkend="intro-important-bootscripts"/> package:</para>
|
---|
98 |
|
---|
99 | <screen><userinput><command>make install-usb</command></userinput></screen>
|
---|
100 |
|
---|
101 | </sect2>
|
---|
102 |
|
---|
103 | <sect2>
|
---|
104 | <title>Contents</title>
|
---|
105 |
|
---|
106 | <para>The <application>libusb</application> package contains
|
---|
107 | <filename class="libraryfile">libusb</filename> libraries,
|
---|
108 | the <filename>/usr/include/usb.h</filename> header,
|
---|
109 | and a <command>usb-config</command> script.</para>
|
---|
110 |
|
---|
111 | </sect2>
|
---|
112 |
|
---|
113 | <sect2><title>Description</title>
|
---|
114 |
|
---|
115 | <sect3><title>libusb libraries</title>
|
---|
116 | <para><filename class="libraryfile">libusb</filename> libraries contain C
|
---|
117 | functions for accessing <acronym>USB</acronym> hardware.</para></sect3>
|
---|
118 |
|
---|
119 | <sect3><title>usb-config</title>
|
---|
120 | <para>The <command>usb-config</command> script provides the right
|
---|
121 | compiler and linker flags for programs using this library.</para></sect3>
|
---|
122 |
|
---|
123 | </sect2>
|
---|
124 |
|
---|
125 | </sect1>
|
---|
126 |
|
---|