Files
KeruOS/web/kama-config.html
T

77 lines
4.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Kama configuration — Keru OS</title>
<meta name="description" content="The full kama configuration reference: PKGDIR, CACHEDIR, ROOT, MAKE_CONF, PURGE_TEMP_DEPS, SOURCE_MIRROR, and the cache layout.">
<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="docs.html">docs</a> / kama configuration</p>
<h1>Kama configuration</h1>
<p>Every knob, every default, every path.</p>
</header>
<section>
<div class="wrap">
<div class="prose">
<p>Kama's configuration is environment variables. Nothing to edit inside the script, nothing hidden — set them in the environment (<code>export</code> in a profile, or inline on the command line) and it's done.</p>
<h3>Variables</h3>
<table>
<tr><th>Variable</th><th>Default</th><th>What it controls</th></tr>
<tr><td><code>PKGDIR</code></td><td>the kama-packages repo, sibling of the kama script</td><td>Where recipes are found.</td></tr>
<tr><td><code>ROOT</code></td><td><code>/tmp/keru/root</code></td><td>Where installed files land.</td></tr>
<tr><td><code>CACHEDIR</code></td><td><code>/var/cache/kama</code></td><td>Base for the dirty working dirs.</td></tr>
<tr><td><code>MAKE_CONF</code></td><td><code>/etc/kama/make.conf</code></td><td>Profile settings (JOBS, CFLAGS, etc.) if present.</td></tr>
<tr><td><code>SOURCE_MIRROR</code></td><td>unset</td><td>Mirror tried before upstream (set to e.g. <code>mirror.keru.org</code>).</td></tr>
<tr><td><code>PURGE_TEMP_DEPS</code></td><td><code>1</code></td><td>Purge temp build deps after <code>kama make</code>.</td></tr>
<tr><td><code>JOBS</code></td><td><code>nproc</code></td><td>Parallel build jobs; recipes call <code>make -j"$JOBS"</code>.</td></tr>
</table>
<h3>Cache layout</h3>
<div class="code-block">$CACHEDIR/
├── dl/ downloaded archives
├── src/ extracted source per package
└── stage/ staged installs, committed to $ROOT on success</div>
<h3>Common setups</h3>
<div class="code-block"># build into a scratch root
ROOT=/mnt/keru-root kama make busybox
# migrate cache to a big disk
export CACHEDIR=/mnt/cache/kama
export SOURCE_MIRROR=https://mirror.example.org
# keep temp deps this run (default removes them)
PURGE_TEMP_DEPS=0 kama make firefox</div>
<h3>make.conf integration</h3>
<p>Inside an installed Keru system, the profile at <code>MAKE_CONF</code> feeds the same variables into kama and the build scripts. Your <a href="make-conf.html">make.conf reference</a> lists the full set.</p>
<ul class="features">
<li>If <code>MAKE_CONF</code> exists it is sourced; missing is not an error.</li>
<li>The installer writes <code>JOBS</code> and <code>CFLAGS</code> from build-host detection.</li>
<li>Every variable has a sane default, so kama runs with zero config.</li>
</ul>
<div class="callout">Zero-config by default, fully pointed overrides when you need them. That's the whole story — read on for <a href="recipe-format.html">recipes</a>.</div>
<p><a href="kama-usage.html">← kama usage</a> · <a href="make-conf.html">make.conf</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>