libusb-0.1.8

Introduction to libusb

The libusb package contains a library used by some applications for USB device access.

Package information

libusb dependencies

Optional

OpenJade-1.3.2 and DocBook SGML DTD-3.1 (both required to build the HTML documentation)

Installation of libusb

Install libusb by running the following commands:

libtoolize -f &&
autoreconf -f &&
./configure --prefix=/usr --disable-build-docs &&
make

Now, as the root user:

make install

If you built the HTML documentation, install it using the following commands:

install -v -d -m755 /usr/share/doc/libusb-0.1.8/html &&
install -v -m644 doc/html/* /usr/share/doc/libusb-0.1.8/html

Command explanations

libtoolize -f: There is a mismatch in the Autotools with LFS-6.0. This command forces the build to use the system installed libtool tools so that the shared library is created correctly.

autoreconf -f: This command recreates some of the Autotools, required by running libtoolize.

--disable-build-docs: This switch avoids building the documentation. If you wish to build the documentation, you may need to remove the OpenSP catalog definitions from the system SGML catalogs. Use the following command before building the package to accomplish this:

sed -i.orig \
    -e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \
    /etc/sgml/catalog \
    /etc/sgml/sgml-docbook.cat

Configuring libusb

libusb requires the usbfs kernel filesystem to be mounted on /proc/bus/usb. 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 usb group exits on your system. If necessary, create the usb group using the following command:

groupadd -g 14 usb

Ensure that you have compiled the “USB device filesystem” directly into the kernel or compiled it as a module (listing the resulting “usbcore” module in the /etc/sysconfig/modules file). You should also have an entry similar to the line below in your /etc/fstab file:

usbfs  /proc/bus/usb  usbfs  devgid=14,devmode=0660  0  0

Contents

Installed Program: usb-config
Installed Library: libusb.[so,a]
Installed Directory: /usr/share/doc/libusb-0.1.8

Short Descriptions

usb-config

is a script that provides the right compiler and linker flags for programs using libusb.

libusb.[so,a]

libraries contain C functions for accessing USB hardware.

Last updated on 2005-02-06 14:09:05 -0700