Files
keru/kama-usage.html
Astral 4a32fab414
Deploy website to GitHub Pages / deploy (push) Failing after 3s
migrate website from KeruOS web to its own repo
2026-09-01 12:06:36 +02:00

79 lines
4.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Kama usage — Keru OS</title>
<meta name="description" content="The kama commands: fetch, build, install, make, purge, info — and how the dependency flow works.">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>ける</text></svg>">
</head>
<body>
<nav class="top" data-nav></nav>
<header class="pagehead">
<p class="crumbs"><a href="index.html">home</a> / <a href="kama.html">kama</a> / usage</p>
<h1>Kama usage</h1>
<p>The whole command surface, in one place.</p>
</header>
<section>
<div class="wrap">
<div class="prose">
<p>Kama's commands are few on purpose. Here's the complete set:</p>
<table>
<tr><th>Command</th><th>What it does</th></tr>
<tr><td><code>kama fetch &lt;pkg&gt;</code></td><td>Download and extract source for a package into the cache.</td></tr>
<tr><td><code>kama build &lt;pkg&gt;</code></td><td>Stage-build one package (configure/make) into its stage dir.</td></tr>
<tr><td><code>kama install &lt;pkg&gt;</code></td><td>Build + install a package into <code>$ROOT</code> (staging-aware).</td></tr>
<tr><td><code>kama make &lt;pkg&gt;</code></td><td>High-level: fetch deps, build, install, then purge temp deps.</td></tr>
<tr><td><code>kama purge [pkg ...]</code></td><td>Remove temp build-time deps after a successful install.</td></tr>
<tr><td><code>kama info &lt;pkg&gt;</code></td><td>Show a recipe's metadata (name, version, url, deps).</td></tr>
<tr><td><code>kama help</code></td><td>Print the command reference.</td></tr>
</table>
<h3>Making a package, end to end</h3>
<p><code>kama make</code> is the command that ties it together. For a package with dependencies it walks through:</p>
<div class="terminal">
<div class="tbar"><span class="dot r"></span><span class="dot y"></span><span class="dot g"></span><span class="t">$ kama make firefox</span></div>
<pre><span class="c">[ kama ]</span> building temp deps for firefox: <span class="k">rust gtk3</span>
<span class="p"> ... fetch, build, install each temp dep ...</span>
<span class="c">[ kama ]</span> building firefox
<span class="p"> ... stage build + install into $ROOT ...</span>
<span class="c">[ kama ]</span> purging temp deps for firefox: <span class="k">rust gtk3</span></pre>
</div>
<h3>Environment & config</h3>
<p>Kama reads a few things to know where to work:</p>
<table>
<tr><th>Variable</th><th>Default</th></tr>
<tr><td><code>PKGDIR</code></td><td>The recipe repo (kama-packages, sibling by default).</td></tr>
<tr><td><code>MAKE_CONF</code></td><td><code>/etc/kama/make.conf</code> — profile settings, if present.</td></tr>
<tr><td><code>ROOT</code></td><td><code>/tmp/keru/root</code> — where installed files go.</td></tr>
<tr><td><code>CACHEDIR</code></td><td><code>/var/cache/kama</code> — source, download, and stage dirs.</td></tr>
<tr><td><code>PURGE_TEMP_DEPS</code></td><td><code>1</code> — whether temp deps are purged after building.</td></tr>
</table>
<h3>Fetch details</h3>
<ul class="features">
<li><strong>Mirror first.</strong> Downloads try <code>SOURCE_MIRROR</code> before upstream, so a mirror you run can carry the load.</li>
<li><strong>Cached.</strong> Already-downloaded source is reused; already-extracted source isn't re-extracted.</li>
<li><strong>Auto-extract.</strong> Tar (gz/xz/bz2/plain) and zip are handled automatically by extension.</li>
</ul>
<div class="callout">Kama's surface stays tiny because the complexity lives in recipes, not the manager. Read <a href="kama-recipes.html">how recipes work</a> next.</div>
<p><a href="kama.html">← Kama overview</a></p>
</div>
</div>
</section>
<footer data-footer></footer>
<noscript><div style="text-align:center;padding:16px">See the <a href="sitemap.html">sitemap</a> for all pages.</div></noscript>
<script src="assets/js/include.js" data-base="."></script>
</body>
</html>