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-md5sum "75655870fb7bb661e6fbd57cbfe81bb2">
|
---|
10 | <!ENTITY libusb-size "314 KB">
|
---|
11 | <!ENTITY libusb-buildsize "4.5 MB (includes HTML documentation installation)">
|
---|
12 | <!ENTITY libusb-time "0.25 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="libusb" xreflabel="libusb-&libusb-version;">
|
---|
16 | <sect1info>
|
---|
17 | <othername>$LastChangedBy$</othername>
|
---|
18 | <date>$Date$</date>
|
---|
19 | </sect1info>
|
---|
20 | <?dbhtml filename="libusb.html"?>
|
---|
21 | <title>libusb-&libusb-version;</title>
|
---|
22 | <indexterm zone="libusb">
|
---|
23 | <primary sortas="a-Libusb">Libusb</primary>
|
---|
24 | </indexterm>
|
---|
25 |
|
---|
26 | <sect2>
|
---|
27 | <title>Introduction to <application>libusb</application></title>
|
---|
28 |
|
---|
29 | <para>The <application>libusb</application> package contains a library
|
---|
30 | used by some applications for <acronym>USB</acronym> device access.</para>
|
---|
31 |
|
---|
32 | <sect3><title>Package information</title>
|
---|
33 | <itemizedlist spacing='compact'>
|
---|
34 | <listitem><para>Download (HTTP):
|
---|
35 | <ulink url="&libusb-download-http;"/></para></listitem>
|
---|
36 | <listitem><para>Download (FTP):
|
---|
37 | <ulink url="&libusb-download-ftp;"/></para></listitem>
|
---|
38 | <listitem><para>Download MD5 sum:
|
---|
39 | &libusb-md5sum;</para></listitem>
|
---|
40 | <listitem><para>Download size:
|
---|
41 | &libusb-size;</para></listitem>
|
---|
42 | <listitem><para>Estimated disk space required:
|
---|
43 | &libusb-buildsize;</para></listitem>
|
---|
44 | <listitem><para>Estimated build time:
|
---|
45 | &libusb-time;</para></listitem></itemizedlist>
|
---|
46 | </sect3>
|
---|
47 |
|
---|
48 | <sect3><title><application>libusb</application> dependencies</title>
|
---|
49 | <sect4><title>Optional</title>
|
---|
50 | <para><xref linkend="openjade"/> and <xref linkend="sgml-dtd-3"/> (both
|
---|
51 | required to build the <acronym>HTML</acronym> documentation)</para>
|
---|
52 | </sect4>
|
---|
53 | </sect3>
|
---|
54 |
|
---|
55 | </sect2>
|
---|
56 |
|
---|
57 | <sect2>
|
---|
58 | <title>Installation of <application>libusb</application></title>
|
---|
59 |
|
---|
60 | <para>Install <application>libusb</application> by running the following
|
---|
61 | commands:</para>
|
---|
62 |
|
---|
63 | <screen><userinput><command>libtoolize -f &&
|
---|
64 | autoreconf -f &&
|
---|
65 | ./configure --prefix=/usr --disable-build-docs &&
|
---|
66 | make</command></userinput></screen>
|
---|
67 |
|
---|
68 | <para>Now, as the root user:</para>
|
---|
69 |
|
---|
70 | <screen><userinput role='root'><command>make install</command></userinput></screen>
|
---|
71 |
|
---|
72 | <para>If you built the <acronym>HTML</acronym> documentation, install it using
|
---|
73 | the following commands:</para>
|
---|
74 |
|
---|
75 | <screen><userinput role='root'><command>install -v -d -m755 /usr/share/doc/libusb-&libusb-version;/html &&
|
---|
76 | install -v -m644 doc/html/* /usr/share/doc/libusb-&libusb-version;/html</command></userinput></screen>
|
---|
77 |
|
---|
78 | </sect2>
|
---|
79 |
|
---|
80 | <sect2>
|
---|
81 | <title>Command explanations</title>
|
---|
82 |
|
---|
83 | <para><command>libtoolize -f</command>: There is a mismatch in the Autotools
|
---|
84 | with <acronym>LFS</acronym>-6.0. This command forces the build to use the
|
---|
85 | system installed <command>libtool</command> tools so that the shared library
|
---|
86 | is created correctly.</para>
|
---|
87 |
|
---|
88 | <para><command>autoreconf -f</command>: This command recreates some of the
|
---|
89 | Autotools, required by running <command>libtoolize</command>.</para>
|
---|
90 |
|
---|
91 | <para><option>--disable-build-docs</option>: This switch avoids building the
|
---|
92 | documentation. If you wish to build the documentation, you may need to remove
|
---|
93 | the <application>OpenSP</application> catalog definitions from the system
|
---|
94 | <acronym>SGML</acronym> catalogs. Use the following command before building
|
---|
95 | the package to accomplish this:</para>
|
---|
96 |
|
---|
97 | <screen><userinput role='root'><command>sed -i.orig \
|
---|
98 | -e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \
|
---|
99 | /etc/sgml/catalog \
|
---|
100 | /etc/sgml/sgml-docbook.cat</command></userinput></screen>
|
---|
101 |
|
---|
102 | </sect2>
|
---|
103 |
|
---|
104 | <sect2>
|
---|
105 | <title>Configuring <application>libusb</application></title>
|
---|
106 |
|
---|
107 | <para>libusb requires the usbfs kernel filesystem to be mounted on
|
---|
108 | <filename class="directory">/proc/bus/usb</filename>. Applications require the
|
---|
109 | files in this directory to be accessible to the user, sometimes for both
|
---|
110 | reading and writing. To restrict access to <acronym>USB</acronym> devices,
|
---|
111 | ensure the usb group exits on your system. If necessary, create the usb group
|
---|
112 | using the following command:</para>
|
---|
113 |
|
---|
114 | <screen><userinput role='root'><command>groupadd -g 14 usb</command></userinput></screen>
|
---|
115 |
|
---|
116 | <para id="libusb-kernel">Ensure that you have compiled the <quote>USB device
|
---|
117 | filesystem</quote> directly into the kernel or compiled it as a module
|
---|
118 | (listing the resulting <quote>usbcore</quote> module in the
|
---|
119 | <filename>/etc/sysconfig/modules</filename> file). You should also have an
|
---|
120 | entry similar to the line below in your <filename>/etc/fstab</filename>
|
---|
121 | file:</para>
|
---|
122 | <indexterm zone="libusb libusb-kernel">
|
---|
123 | <primary sortas="d-USB-device-filesystem">USB device filesystem</primary>
|
---|
124 | </indexterm>
|
---|
125 |
|
---|
126 | <screen><userinput role='root'>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</userinput></screen>
|
---|
127 |
|
---|
128 | </sect2>
|
---|
129 |
|
---|
130 | <sect2>
|
---|
131 | <title>Contents</title>
|
---|
132 |
|
---|
133 | <segmentedlist>
|
---|
134 | <segtitle>Installed Program</segtitle>
|
---|
135 | <segtitle>Installed Library</segtitle>
|
---|
136 | <segtitle>Installed Directory</segtitle>
|
---|
137 |
|
---|
138 | <seglistitem>
|
---|
139 | <seg>usb-config</seg>
|
---|
140 | <seg>libusb.[so,a]</seg>
|
---|
141 | <seg>/usr/share/doc/libusb-&libusb-version;</seg>
|
---|
142 | </seglistitem>
|
---|
143 | </segmentedlist>
|
---|
144 |
|
---|
145 | <variablelist>
|
---|
146 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
147 | <?dbfo list-presentation="list"?>
|
---|
148 |
|
---|
149 | <varlistentry id="usb-config">
|
---|
150 | <term><command>usb-config</command></term>
|
---|
151 | <listitem><para>is a script that provides the right compiler and linker
|
---|
152 | flags for programs using
|
---|
153 | <filename class='libraryfile'>libusb</filename>.</para>
|
---|
154 | <indexterm zone="libusb usb-config">
|
---|
155 | <primary sortas="b-usb-config">usb-config</primary>
|
---|
156 | </indexterm></listitem>
|
---|
157 | </varlistentry>
|
---|
158 |
|
---|
159 | <varlistentry id="libusb-lib">
|
---|
160 | <term><filename class='libraryfile'>libusb.[so,a]</filename></term>
|
---|
161 | <listitem><para> libraries contain C functions for accessing
|
---|
162 | <acronym>USB</acronym> hardware.</para>
|
---|
163 | <indexterm zone="libusb libusb-lib">
|
---|
164 | <primary sortas="c-libusb">libusb.[so,a]</primary>
|
---|
165 | </indexterm></listitem>
|
---|
166 | </varlistentry>
|
---|
167 | </variablelist>
|
---|
168 |
|
---|
169 | </sect2>
|
---|
170 |
|
---|
171 | </sect1>
|
---|
172 |
|
---|