mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-21 12:24:17 +08:00
Simplify cargo recipes
This commit is contained in:
parent
60bf37dd0c
commit
7cb4b95b03
@ -4,8 +4,5 @@ git = "https://gitlab.redox-os.org/redox-os/findutils.git"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
COOKBOOK_CARGO_FLAGS+=(
|
||||
--bin find
|
||||
)
|
||||
cookbook_cargo
|
||||
cookbook_cargo --bin find
|
||||
"""
|
||||
|
||||
@ -5,17 +5,5 @@ branch = "redox"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
EXAMPLES=(
|
||||
styling
|
||||
)
|
||||
set -x
|
||||
for example in "${EXAMPLES[@]}"
|
||||
do
|
||||
${COOKBOOK_CARGO} build \
|
||||
--release \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
--package "${example}"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/bin"
|
||||
cp -v "target/${TARGET}/release/${example}" "${COOKBOOK_STAGE}/bin/iced_${example}"
|
||||
done
|
||||
cookbook_cargo_packages styling
|
||||
"""
|
||||
|
||||
@ -5,11 +5,5 @@ branch = "redox"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
set -x
|
||||
${COOKBOOK_CARGO} build \
|
||||
--release \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
--package cosmic
|
||||
mkdir -pv "${COOKBOOK_STAGE}/bin"
|
||||
cp -v "target/${TARGET}/release/cosmic" "${COOKBOOK_STAGE}/bin/libcosmic"
|
||||
cookbook_cargo_packages cosmic
|
||||
"""
|
||||
|
||||
@ -4,12 +4,7 @@ git = "https://gitlab.redox-os.org/redox-os/orbterm.git"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
COOKBOOK_CARGO_FLAGS=(
|
||||
--path "${COOKBOOK_SOURCE}"
|
||||
--root "${COOKBOOK_STAGE}/ui"
|
||||
--locked
|
||||
--no-track
|
||||
)
|
||||
COOKBOOK_STAGE="${COOKBOOK_STAGE}/ui"
|
||||
cookbook_cargo
|
||||
"""
|
||||
|
||||
|
||||
@ -4,28 +4,12 @@ git = "https://gitlab.redox-os.org/redox-os/orbutils.git"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
COOKBOOK_CARGO_FLAGS=(
|
||||
--path "${COOKBOOK_SOURCE}/orbutils"
|
||||
--root "${COOKBOOK_STAGE}/ui"
|
||||
--locked
|
||||
--no-track
|
||||
)
|
||||
COOKBOOK_STAGE="${COOKBOOK_STAGE}/ui"
|
||||
ORIGINAL_SOURCE="${COOKBOOK_SOURCE}"
|
||||
|
||||
COOKBOOK_SOURCE="${ORIGINAL_SOURCE}/orbutils"
|
||||
cookbook_cargo
|
||||
COOKBOOK_CARGO_FLAGS=(
|
||||
--path "${COOKBOOK_SOURCE}/calculator"
|
||||
--root "${COOKBOOK_STAGE}/ui"
|
||||
--locked
|
||||
--no-track
|
||||
)
|
||||
|
||||
COOKBOOK_SOURCE="${ORIGINAL_SOURCE}/calculator"
|
||||
cookbook_cargo
|
||||
"""
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"orbital",
|
||||
"expat",
|
||||
"fontconfig",
|
||||
"freetype",
|
||||
"libpng",
|
||||
"zlib",
|
||||
]
|
||||
|
||||
@ -4,9 +4,6 @@ git = "https://gitlab.redox-os.org/redox-os/redoxer.git"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
COOKBOOK_CARGO_FLAGS=(
|
||||
--path "${COOKBOOK_SOURCE}/daemon"
|
||||
--root "${COOKBOOK_STAGE}"
|
||||
)
|
||||
COOKBOOK_SOURCE="${COOKBOOK_SOURCE}/daemon"
|
||||
cookbook_cargo
|
||||
"""
|
||||
|
||||
@ -5,12 +5,7 @@ branch = "redox"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
COOKBOOK_CARGO_FLAGS+=(
|
||||
--no-default-features
|
||||
--features feat_os_unix_redox
|
||||
--bin coreutils
|
||||
)
|
||||
cookbook_cargo
|
||||
cookbook_cargo --no-default-features --features feat_os_unix_redox --bin coreutils
|
||||
|
||||
BINS=(
|
||||
base32
|
||||
|
||||
@ -461,14 +461,13 @@ export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
|
||||
|
||||
# cargo template
|
||||
COOKBOOK_CARGO="${COOKBOOK_REDOXER}"
|
||||
COOKBOOK_CARGO_FLAGS=(
|
||||
--path "${COOKBOOK_SOURCE}"
|
||||
--root "${COOKBOOK_STAGE}"
|
||||
--locked
|
||||
--no-track
|
||||
)
|
||||
function cookbook_cargo {
|
||||
"${COOKBOOK_CARGO}" install "${COOKBOOK_CARGO_FLAGS[@]}"
|
||||
"${COOKBOOK_CARGO}" install \
|
||||
--path "${COOKBOOK_SOURCE}" \
|
||||
--root "${COOKBOOK_STAGE}" \
|
||||
--locked \
|
||||
--no-track \
|
||||
"$@"
|
||||
}
|
||||
|
||||
# helper for installing binaries that are cargo examples
|
||||
|
||||
Loading…
Reference in New Issue
Block a user