add website and GitHub Pages deployment

This commit is contained in:
Astral
2026-09-01 11:23:34 +02:00
parent cb1da62339
commit da28f784a8
48 changed files with 3392 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Kama recipes — Keru OS</title>
<meta name="description" content="How kama recipes work: plain shell scripts that define name, version, url, deps, and the build/install steps.">
<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> / recipes</p>
<h1>Kama recipes</h1>
<p>The package manager runs recipes. Here's what a recipe is.</p>
</header>
<section>
<div class="wrap">
<div class="prose">
<p>A Kama recipe is a <strong>plain shell script</strong>. It declares metadata and defines build steps. There is no DSL to learn beyond shell itself — which is the point. The recipe repository (<a href="kama-repos.html">kama-packages</a>) contains one file per package, and each one is readable top to bottom.</p>
<h3>Anatomy of a recipe</h3>
<div class="code-block">name=busybox
version=1.36.1
url="https://busybox.net/downloads/busybox-${version}.tar.bz2"
deps=( make )
build() {
cp ../config .config # basic setup from kama
make -j"$(nproc)"
}
install() {
make install CONFIG_PREFIX="$DESTDIR"
}</div>
<p>The key fields:</p>
<table>
<tr><th>Field</th><th>Meaning</th></tr>
<tr><td><code>name</code></td><td>Package name; used for the stage and cache paths.</td></tr>
<tr><td><code>version</code></td><td>The release version, typically embedded in the <code>url</code>.</td></tr>
<tr><td><code>url</code></td><td>Upstream source tarball (mirror-then-upstream on fetch).</td></tr>
<tr><td><code>deps</code></td><td>Array of build-time dependencies, built then purged.</td></tr>
<tr><td><code>build()</code></td><td>Runs in the extracted source dir — configure & compile.</td></tr>
<tr><td><code>install()</code></td><td>Installs into the package's stage dir (<code>DESTDIR</code>).</td></tr>
</table>
<h3>Two tiers</h3>
<p>Recipes can stay deliberately simple or take full control:</p>
<ul class="features">
<li><strong>Easy tier</strong> — the <code>build()</code> / <code>install()</code> sugar above. Great for "configure, make, make install" packages.</li>
<li><strong>Advanced tier</strong> — <code>pkg_build()</code>, <code>pkg_install()</code>, custom <code>pkg_fetch()</code>, and a <code>pkg_post()</code> hook. For packages that need a hand.</li>
</ul>
<p>Kama maps the easy tier onto the advanced one when the advanced forms aren't defined, so simple recipes stay simple and complex ones stay powerful.</p>
<h3>The staging model</h3>
<p>Building installs into a per-package stage dir, not the live root. That's how kama can assemble a complete system in <code>$ROOT</code> — the installer's whole trick — without ever touching the tree being built. The install step copies the staged dir into <code>$ROOT</code>.</p>
<h3>How it's found</h3>
<p>Kama locates a recipe by trying <code>PKGDIR/&lt;pkg&gt;/PKGBUILD</code>, then <code>PKGDIR/&lt;pkg&gt;.sh</code>, then <code>PKGDIR/&lt;pkg&gt;/*.sh</code>. Naming a recipe file <code>&lt;pkg&gt;.sh</code> is the common case.</p>
<div class="callout">A recipe is a contract you can read. No opaque package format, no hidden build logic — if you can read shell, you can audit every package in the repository.</div>
<p><a href="recipe-format.html">The formal recipe format spec</a> · <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>