glfs/general/genlib/libgusb.xml
2024-01-19 22:39:35 +01:00

201 lines
5.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY libgusb-download-http "https://github.com/hughsie/libgusb/releases/download/&libgusb-version;/libgusb-&libgusb-version;.tar.xz">
<!ENTITY libgusb-download-ftp " ">
<!ENTITY libgusb-md5sum "edc0715ded0b886c063189deef94c754">
<!ENTITY libgusb-size "52 KB">
<!ENTITY libgusb-buildsize "2.1 MB (with tests and docs)">
<!ENTITY libgusb-time "0.1 SBU (with tests and docs)">
]>
<sect1 id="libgusb" xreflabel="libgusb-&libgusb-version;">
<?dbhtml filename="libgusb.html"?>
<title>libgusb-&libgusb-version;</title>
<indexterm zone="libgusb">
<primary sortas="a-libgusb">libgusb</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to libgusb</title>
<para>
The <application>libgusb</application> package contains the GObject
wrappers for <application>libusb-1.0</application> that makes it
easy to do asynchronous control, bulk and interrupt transfers with
proper cancellation and integration into a mainloop.
</para>
&lfs120_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&libgusb-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&libgusb-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &libgusb-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &libgusb-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &libgusb-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &libgusb-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">libgusb Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="json-glib"/> and
<xref linkend="libusb"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="gobject-introspection"/>,
<xref linkend="usbutils"/> (for <filename>usb.ids</filename> data file,
which is also required for the tests), and
<xref linkend="vala"/>
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="gi-docgen"/> and
<xref linkend="umockdev"/> (for full test coverage)
</para>
</sect2>
<sect2 role="installation">
<title>Installation of libgusb</title>
<para>
Install <application>libgusb</application> by running the following
commands:
</para>
<screen><userinput>mkdir build &amp;&amp;
cd build &amp;&amp;
meson setup .. \
--prefix=/usr \
--buildtype=release \
-Ddocs=false &amp;&amp;
ninja</userinput></screen>
<para>
If you have <xref linkend='gi-docgen'/> installed and wish to build
the API documentation for this package, issue:
</para>
<screen role='nodump'><userinput>sed -E "/output|install_dir/s/('libgusb)'/\1-&libgusb-version;'/" \
-i ../docs/meson.build &amp;&amp;
meson configure -Ddocs=true &amp;&amp;
ninja</userinput></screen>
<para>
To test the results, issue: <command>ninja test</command>.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>ninja install</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/meson-buildtype-release.xml"/>
<para>
<parameter>-Ddocs=false</parameter>: &gi-doc-disable;
</para>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Library</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
gusbcmd
</seg>
<seg>
libgusb.so
</seg>
<seg>
/usr/include/gusb-1 and
/usr/share/doc/libgusb-&libgusb-version; (if gi-docgen is used)
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="gusbcmd">
<term><command>gusbcmd</command></term>
<listitem>
<para>
is a debugging tool for the libgusb library
</para>
<indexterm zone="libgusb gusbcmd">
<primary sortas="b-gusbcmd">gusbcmd</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libgusb-lib">
<term><filename class="libraryfile">libgusb.so</filename></term>
<listitem>
<para>
contains the <application>libgusb</application> API functions
</para>
<indexterm zone="libgusb libgusb-lib">
<primary sortas="c-libgusb">libgusb.so</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>