home / docs / recipe authoring
Writing a kama recipe, top to bottom.
Every package in a Keru system is described by a recipe: a plain POSIX shell script in kama-packages. Writing one is closer to filling a form than engineering a build.
kama-packages/TEMPLATE.sh is the canonical starting point. Copy it, fill the easy tier:
This is the entire busybox recipe currently in the repo:
That's it. Kama downloads, extracts, strips the top dir, builds, stages, and installs.
| Need | Field / function |
|---|---|
| Colliding with another package | provides=(...) conflicts=(...) |
| Build deps that must stay | runtime_deps=(...) |
| Arch-restricted | arch=(x86_64) |
| Repo or vcs sources | noextract=("$url") + own build() |
| Custom fetch (patch first) | pkg_fetch() { default_fetch; patch ...; } |
| Post-install work | pkg_post() · pkg_split() for subpackages |
install() installs into $pkgdir. Kama commits the staging dir to $ROOT only after a successful build.deps. They're purged automatically after the build (AUR-style). Keeps the door clean.license=(SPDX) — supply chain cleanliness starts here.url + version, never a moving "latest".busybox.sh, the smallest real recipe.