libgusb-0.4.9

#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-1357

### Chapter 9. General Libraries

- Prev

  libgudev-238

- Next

  libical-4.0.5

- Up
- Home

# libgusb-0.4.9

## Introduction to libgusb

The libgusb package contains the GObject wrappers for libusb-1.0 that makes it easy to do asynchronous control, bulk and interrupt transfers with proper cancellation and integration into a mainloop.

### Note

This package is known to build and work properly using an LFS 13.1 platform.

### Package Information

- Download (HTTP): https://github.com/hughsie/libgusb/releases/download/0.4.9/libgusb-0.4.9.tar.xz

- Download MD5 sum: 354a3227334991ea4e924843c144bd82

- Download size: 52 KB

- Estimated disk space required: 5.0 MB (with tests and docs)

- Estimated build time: 0.1 SBU (with tests and docs)

### libgusb Dependencies

#### Required

json-glib-1.10.8 and libusb-1.0.30

#### Recommended

GLib-2.88.3 (with GObject Introspection), hwdata-0.410 (for `usb.ids` data file, which is also required for the tests), and Vala-0.56.19

#### Optional

Gi-DocGen-2026.1 and umockdev-0.19.8 (for full test coverage)

## Installation of libgusb

Install libgusb by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup ..            \
          --prefix=/usr       \
          --buildtype=release \
          -D docs=false       &&
    ninja

If you have Gi-DocGen-2026.1 installed and wish to build the API documentation for this package, issue:

    sed -E "/output|install_dir/s/('libgusb)'/\1-0.4.9'/" \
        -i ../docs/meson.build                            &&
    meson configure -D docs=true                          &&
    ninja

To test the results, run:

    sed -e 's/pkg_resources/packaging.version/'  \
        -e 's/parse_version/parse/g'             \
        -i ../contrib/generate-version-script.py &&
    ninja test

Now, as the `root` user:

    ninja install

## Command Explanations

`--buildtype=release`: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

`-D docs=false`: Allow building this package without Gi-DocGen-2026.1 installed. If you have Gi-DocGen-2026.1 installed and you wish to rebuild and install the API documentation, a meson configure command will reset this option.

## Contents

Installed Programs: gusbcmd
Installed Library: libgusb.so
Installed Directories: /usr/include/gusb-1 and /usr/share/doc/libgusb-0.4.9 (if gi-docgen is used)

### Short Descriptions

gusbcmd | is a debugging tool for the libgusb library
`libgusb.so` | contains the libgusb API functions

- Prev

  libgudev-238

- Next

  libical-4.0.5

- Up
- Home