The spec for kama packages.
A recipe is a plain POSIX shell script describing how to compile and install one piece of software. The syntax splits into two tiers:
build and install, done. Covers ~90% of packages (autotools/cmake/meson).In both tiers, Kama sources the recipe and runs the functions you define.
That's it. Kama supplies the conventional pkg_fetch (download + extract — auto-detects .tar.xz/.gz/.bz2/.zip, strips the top directory) and pkg_clean.
| Field | Purpose |
|---|---|
name | Package name. Required. |
version | Release version. Required for fetch. |
url | Upstream source (or list). |
deps | Build-time dependencies — compiled, installed, then purged (AUR-style). |
runtime_deps | Dependencies that stay installed. |
license | SPDX license identifiers. |
provides | Capabilities this package provides (virtuals). |
conflicts | Mutual exclusions. |
arch | Architecture allow-list; empty means any. |
noextract | URLs downloaded but not auto-extracted. |
| Function | Role |
|---|---|
build() | Configure + compile, run in the extracted source dir. |
install() | Install into the staging dir ($pkgdir/DESTDIR), not the live root. |
pkg_fetch() | Override download/extract (can call default_fetch). |
pkg_clean() | Override source cleanup. |
pkg_post() | Post-install hook, called after staging. |
pkg_split() | Optional splitting of staged output into subpackages. |
docs/recipe-format.md. The web version mirrors it; the canonical source is the repository.