[e462a41] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY cargoc-download-http "https://github.com/lu-zero/cargo-c/archive/v&cargo-c-version;/cargo-c-&cargo-c-version;.tar.gz">
|
---|
| 8 | <!ENTITY cargoc-download-ftp " ">
|
---|
[20cd9620] | 9 | <!ENTITY cargoc-md5sum "f362846f3e16795fc65d868e7a39bc48">
|
---|
| 10 | <!ENTITY cargoc-size "36 KB">
|
---|
[e462a41] | 11 | <!ENTITY cargoc-buildsize "722 MB">
|
---|
| 12 | <!ENTITY cargoc-time "0.5 SBU">
|
---|
| 13 |
|
---|
[20cd9620] | 14 | <!ENTITY cargoc-lock-md5sum "8f013a75a5622d58f395eea63991088a">
|
---|
[e462a41] | 15 | ]>
|
---|
| 16 |
|
---|
| 17 | <sect1 id="cargo-c" xreflabel="cargo-c-&cargo-c-version;">
|
---|
| 18 | <?dbhtml filename="cargo-c.html"?>
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | <title>cargo-c-&cargo-c-version;</title>
|
---|
| 22 |
|
---|
| 23 | <indexterm zone="cargo-c">
|
---|
| 24 | <primary sortas="a-cargo-c">cargo-c</primary>
|
---|
| 25 | </indexterm>
|
---|
| 26 |
|
---|
| 27 | <sect2 role="package">
|
---|
[1f568d14] | 28 | <title>Introduction to cargo-c</title>
|
---|
[e462a41] | 29 |
|
---|
| 30 | <para>
|
---|
| 31 | The <application>cargo-c</application> package creates a cargo
|
---|
[0d82143] | 32 | subcommand to build and install C-ABI compatible dynamic and
|
---|
[e462a41] | 33 | static libraries.
|
---|
| 34 | </para>
|
---|
| 35 |
|
---|
| 36 | &lfs122_checked;
|
---|
| 37 |
|
---|
| 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>
|
---|
| 42 | Download (HTTP): <ulink url="&cargoc-download-http;"/>
|
---|
| 43 | </para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>
|
---|
| 47 | Download (FTP): <ulink url="&cargoc-download-ftp;"/>
|
---|
| 48 | </para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>
|
---|
| 52 | Download MD5 sum: &cargoc-md5sum;
|
---|
| 53 | </para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>
|
---|
| 57 | Download size: &cargoc-size;
|
---|
| 58 | </para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>
|
---|
| 62 | Estimated disk space required: &cargoc-buildsize;
|
---|
| 63 | </para>
|
---|
| 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
| 66 | <para>
|
---|
| 67 | Estimated build time: &cargoc-time;
|
---|
| 68 | </para>
|
---|
| 69 | </listitem>
|
---|
| 70 | </itemizedlist>
|
---|
| 71 |
|
---|
[26c3ba5] | 72 | <!-- Moved to an explicit curl command. See the note below the
|
---|
| 73 | curl command for reason.
|
---|
[e462a41] | 74 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 75 | <itemizedlist spacing="compact">
|
---|
| 76 | <listitem>
|
---|
| 77 | <para>
|
---|
| 78 | Required download: <ulink url="https://github.com/lu-zero/cargo-c/releases/download/v&cargo-c-version;/Cargo.lock"/>
|
---|
| 79 | </para>
|
---|
| 80 | <para>
|
---|
| 81 | Cargo.lock md5sum: &Cargo.lock-md5sum;
|
---|
| 82 | </para>
|
---|
| 83 | </listitem>
|
---|
| 84 |
|
---|
[26c3ba5] | 85 | </itemizedlist>-->
|
---|
[e462a41] | 86 |
|
---|
| 87 | <bridgehead renderas="sect3">cargo-c Dependencies</bridgehead>
|
---|
| 88 |
|
---|
| 89 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 90 | <para role="required">
|
---|
[26c3ba5] | 91 | <xref linkend="rust"/>
|
---|
| 92 | </para>
|
---|
| 93 |
|
---|
| 94 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 95 | <para role="recommended">
|
---|
| 96 | <xref linkend="libssh2"/> and
|
---|
| 97 | <xref linkend="sqlite"/>
|
---|
[e462a41] | 98 | </para>
|
---|
| 99 |
|
---|
[26c3ba5] | 100 | &build-use-internet;
|
---|
| 101 |
|
---|
[e462a41] | 102 | </sect2>
|
---|
| 103 |
|
---|
| 104 | <sect2 role="installation">
|
---|
[26c3ba5] | 105 | <title>Installation of cargo-c</title>
|
---|
[e462a41] | 106 |
|
---|
| 107 | <para>
|
---|
[d8a77b2] | 108 | First, download a file to ensure that <command>cargo</command> uses
|
---|
| 109 | the dependency versions specified by the upstream developers
|
---|
[26c3ba5] | 110 | when this cargo-c version (&cargo-c-version;) was released.
|
---|
[d8a77b2] | 111 | Without this, the latest versions of the dependencies would be used and
|
---|
[26c3ba5] | 112 | they might cause breakages:
|
---|
[e462a41] | 113 | </para>
|
---|
| 114 |
|
---|
[26c3ba5] | 115 | <screen><userinput>curl -LO https://github.com/lu-zero/cargo-c/releases/download/v&cargo-c-version;/Cargo.lock</userinput></screen>
|
---|
| 116 |
|
---|
| 117 | <note>
|
---|
| 118 | <para>
|
---|
| 119 | Normally we would put such a download into an
|
---|
[d8a77b2] | 120 | <quote>Additional Downloads</quote> section. But in this case we
|
---|
[26c3ba5] | 121 | cannot tell the package name and version from the file name
|
---|
| 122 | <filename>Cargo.lock</filename>, so it's better not to put the
|
---|
| 123 | ambigiously-named file outside the
|
---|
| 124 | <filename class='directory'>cargo-c-&cargo-c-version;</filename>
|
---|
| 125 | directory. We use <command>curl</command> here because the
|
---|
| 126 | <xref linkend='curl'/> package should have been installed
|
---|
| 127 | as a required dependency of <xref linkend='rust'/>.
|
---|
| 128 | </para>
|
---|
[f67824e] | 129 |
|
---|
| 130 | <para>
|
---|
| 131 | The md5sum of the file should be
|
---|
[20cd9620] | 132 | <literal>&cargoc-lock-md5sum;</literal>.
|
---|
[f67824e] | 133 | </para>
|
---|
[26c3ba5] | 134 | </note>
|
---|
| 135 |
|
---|
| 136 | <para>
|
---|
| 137 | Install <application>cargo-c</application> by running the following
|
---|
| 138 | commands:
|
---|
| 139 | </para>
|
---|
[e462a41] | 140 |
|
---|
[26c3ba5] | 141 | <screen><userinput>[ ! -e /usr/include/libssh2.h ] || export LIBSSH2_SYS_USE_PKG_CONFIG=1 &&
|
---|
[e462a41] | 142 | [ ! -e /usr/include/sqlite3.h ] || export LIBSQLITE3_SYS_USE_PKG_CONFIG=1 &&
|
---|
| 143 |
|
---|
| 144 | cargo build --release</userinput></screen>
|
---|
| 145 |
|
---|
| 146 | <para>
|
---|
| 147 | To test the results, issue: <command>cargo test --release</command>.
|
---|
| 148 | </para>
|
---|
| 149 |
|
---|
| 150 | <para>
|
---|
| 151 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 152 | </para>
|
---|
| 153 |
|
---|
| 154 | <screen role="root"><userinput>install -vm755 target/release/cargo-{capi,cbuild,cinstall,ctest} /usr/bin/</userinput></screen>
|
---|
| 155 |
|
---|
| 156 | </sect2>
|
---|
| 157 | <!--
|
---|
| 158 | <sect2 role="commands">
|
---|
| 159 | <title>Command Explanations</title>
|
---|
| 160 |
|
---|
| 161 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 162 | href="../../xincludes/meson-buildtype-release.xml"/>
|
---|
| 163 |
|
---|
| 164 | </sect2>
|
---|
| 165 | -->
|
---|
| 166 | <sect2 role="content">
|
---|
| 167 | <title>Contents</title>
|
---|
| 168 |
|
---|
| 169 | <segmentedlist>
|
---|
| 170 | <segtitle>Installed Programs</segtitle>
|
---|
| 171 | <segtitle>Installed Libraries</segtitle>
|
---|
| 172 | <segtitle>Installed Directories</segtitle>
|
---|
| 173 |
|
---|
| 174 | <seglistitem>
|
---|
| 175 | <seg>
|
---|
| 176 | cargo-capi,
|
---|
| 177 | cargo-cbuild,
|
---|
| 178 | cargo-cinstall, and
|
---|
| 179 | cargo-ctest
|
---|
| 180 | </seg>
|
---|
| 181 | <seg>
|
---|
| 182 | None
|
---|
| 183 | </seg>
|
---|
| 184 | <seg>
|
---|
| 185 | None
|
---|
| 186 | </seg>
|
---|
| 187 | </seglistitem>
|
---|
| 188 | </segmentedlist>
|
---|
| 189 |
|
---|
| 190 | </sect2>
|
---|
| 191 |
|
---|
| 192 | </sect1>
|
---|