3bcf4cc196
Comprehensive fix — not a fallback. Each recipe now has explicit [package] section with name and version. Version inference: - Git-source recipes without rev/branch: '0.1.0' (Red Bear convention) - Tar/git recipes with version in URL or dir name: extracted version - Sysroot-copy recipes: matched to toolchain version Affected: 250+ recipes across all categories (core, libs, dev, system, kde, qt, drivers, gpu, drm, kernel, userspace, etc.) Every recipe in the redbear-mini build chain that was missing [package] now has explicit version metadata. Cookbook can now always determine a version at packaging time, eliminating 'cannot guess version' failures. No cookbook fallback hack — the source of truth is recipe metadata.
40 lines
1.2 KiB
TOML
40 lines
1.2 KiB
TOML
[package]
|
|
name = "linux-kpi"
|
|
version = "0.1.0"
|
|
|
|
# linux-kpi build-ordering marker. Downstream driver builds compile the crate via Cargo path deps.
|
|
# The cookbook cargo template cannot install a library-only crate cleanly here, so keep this as a
|
|
# custom recipe until the cookbook grows first-class Rust library packaging.
|
|
#
|
|
# We install the C compatibility headers into the sysroot so that meson/cmake recipes
|
|
# (libdrm, mesa, etc.) can find them at <linux-kpi/drm/...>.
|
|
[source]
|
|
path = "source"
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"redox-driver-sys",
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
|
|
echo "linux-kpi: installing C compatibility headers into sysroot"
|
|
mkdir -p "${COOKBOOK_STAGE}/usr/include/linux-kpi"
|
|
cp -R "${COOKBOOK_SOURCE}/src/c_headers/." "${COOKBOOK_STAGE}/usr/include/linux-kpi/"
|
|
|
|
echo "linux-kpi: building static library"
|
|
cd "${COOKBOOK_SOURCE}"
|
|
export CARGO_TARGET_DIR="${COOKBOOK_SOURCE}/target"
|
|
"${COOKBOOK_CARGO}" build \
|
|
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
|
--lib \
|
|
--release \
|
|
--target "${TARGET}" \
|
|
-j "${COOKBOOK_MAKE_JOBS}"
|
|
|
|
mkdir -p "${COOKBOOK_STAGE}/usr/lib"
|
|
cp "${CARGO_TARGET_DIR}/${TARGET}/release/liblinux_kpi.a" \
|
|
"${COOKBOOK_STAGE}/usr/lib/liblinux_kpi.a"
|
|
"""
|