mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-22 12:54:20 +08:00
Convert orbutils recipes from recipe.sh to recipe.toml
This commit is contained in:
parent
8c8136bb6d
commit
0bfd573dda
@ -1,4 +0,0 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/orbutils.git
|
||||
BINDIR=/usr/bin
|
||||
CARGOFLAGS="--bin background -p orbutils"
|
||||
DEPENDS="orbital"
|
||||
12
recipes/gui/orbutils-background/recipe.toml
Normal file
12
recipes/gui/orbutils-background/recipe.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/orbutils.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
package_path = "orbutils"
|
||||
cargoflags = "--bin background"
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"orbital"
|
||||
]
|
||||
@ -1,4 +0,0 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/orbutils.git
|
||||
BINDIR=/usr/bin
|
||||
CARGOFLAGS="--bin launcher -p orbutils"
|
||||
DEPENDS="orbital"
|
||||
11
recipes/gui/orbutils-launcher/recipe.toml
Normal file
11
recipes/gui/orbutils-launcher/recipe.toml
Normal file
@ -0,0 +1,11 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/orbutils.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
package_path = "launcher"
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"orbital"
|
||||
]
|
||||
@ -1,4 +0,0 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/orbutils.git
|
||||
BINDIR=/usr/bin
|
||||
CARGOFLAGS="--bin orblogin -p orbutils"
|
||||
DEPENDS="orbital"
|
||||
12
recipes/gui/orbutils-orblogin/recipe.toml
Normal file
12
recipes/gui/orbutils-orblogin/recipe.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/orbutils.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
package_path = "orbutils"
|
||||
cargoflags = "--bin orblogin"
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"orbital"
|
||||
]
|
||||
@ -466,7 +466,7 @@ fi
|
||||
COOKBOOK_CARGO="${COOKBOOK_REDOXER}"
|
||||
function cookbook_cargo {
|
||||
"${COOKBOOK_CARGO}" install \
|
||||
--path "${COOKBOOK_SOURCE}" \
|
||||
--path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}" \
|
||||
--root "${COOKBOOK_STAGE}/usr" \
|
||||
--locked \
|
||||
--no-track \
|
||||
@ -480,7 +480,7 @@ function cookbook_cargo_examples {
|
||||
for example in "$@"
|
||||
do
|
||||
"${COOKBOOK_CARGO}" build \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}/Cargo.toml" \
|
||||
--example "${example}" \
|
||||
${build_flags}
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
@ -496,7 +496,7 @@ function cookbook_cargo_packages {
|
||||
for package in "$@"
|
||||
do
|
||||
"${COOKBOOK_CARGO}" build \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}/Cargo.toml" \
|
||||
--package "${package}" \
|
||||
${build_flags}
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
@ -560,9 +560,11 @@ done
|
||||
//TODO: configurable target
|
||||
//TODO: Add more configurability, convert scripts to Rust?
|
||||
let script = match &build.kind {
|
||||
BuildKind::Cargo => "cookbook_cargo",
|
||||
BuildKind::Configure => "cookbook_configure",
|
||||
BuildKind::Custom { script } => script
|
||||
BuildKind::Cargo { package_path, cargoflags } => {
|
||||
format!("PACKAGE_PATH={} cookbook_cargo {cargoflags}", package_path.as_deref().unwrap_or("."))
|
||||
}
|
||||
BuildKind::Configure => "cookbook_configure".to_owned(),
|
||||
BuildKind::Custom { script } => script.clone(),
|
||||
};
|
||||
|
||||
let command = {
|
||||
|
||||
@ -38,7 +38,13 @@ pub enum SourceRecipe {
|
||||
pub enum BuildKind {
|
||||
/// Will build and install using cargo
|
||||
#[serde(rename = "cargo")]
|
||||
Cargo,
|
||||
Cargo {
|
||||
#[serde(default)]
|
||||
package_path: Option<String>,
|
||||
|
||||
#[serde(default)]
|
||||
cargoflags: String,
|
||||
},
|
||||
/// Will build and install using configure and make
|
||||
#[serde(rename = "configure")]
|
||||
Configure,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user