The package manager runs recipes. Here's what a recipe is.
A Kama recipe is a plain shell script. It declares metadata and defines build steps. There is no DSL to learn beyond shell itself — which is the point. The recipe repository (kama-packages) contains one file per package, and each one is readable top to bottom.
The key fields:
| Field | Meaning |
|---|---|
name | Package name; used for the stage and cache paths. |
version | The release version, typically embedded in the url. |
url | Upstream source tarball (mirror-then-upstream on fetch). |
deps | Array of build-time dependencies, built then purged. |
build() | Runs in the extracted source dir — configure & compile. |
install() | Installs into the package's stage dir (DESTDIR). |
Recipes can stay deliberately simple or take full control:
build() / install() sugar above. Great for "configure, make, make install" packages.pkg_build(), pkg_install(), custom pkg_fetch(), and a pkg_post() hook. For packages that need a hand.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.
Building installs into a per-package stage dir, not the live root. That's how kama can assemble a complete system in $ROOT — the installer's whole trick — without ever touching the tree being built. The install step copies the staged dir into $ROOT.
Kama locates a recipe by trying PKGDIR/<pkg>/PKGBUILD, then PKGDIR/<pkg>.sh, then PKGDIR/<pkg>/*.sh. Naming a recipe file <pkg>.sh is the common case.