Init, adding corrade,magnum,magnum-plugins,magnum-integration,magnum-extras, and magnum-examples 2025.47_1
This commit is contained in:
28
common/build-style/cargo.sh
Normal file
28
common/build-style/cargo.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# This helper is for building rust projects which use cargo for building
|
||||
#
|
||||
|
||||
do_build() {
|
||||
: ${make_cmd:=cargo auditable}
|
||||
|
||||
${make_cmd} build --release --locked --target ${RUST_TARGET} \
|
||||
${configure_args} ${make_build_args}
|
||||
}
|
||||
|
||||
do_check() {
|
||||
: ${make_cmd:=cargo auditable}
|
||||
|
||||
${make_check_pre} ${make_cmd} test --release --locked --target ${RUST_TARGET} \
|
||||
${configure_args} ${make_check_args}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
: ${make_cmd:=cargo auditable}
|
||||
: ${make_install_args:=--path .}
|
||||
|
||||
${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
|
||||
--offline --locked ${configure_args} ${make_install_args}
|
||||
|
||||
rm -f "${DESTDIR}"/usr/.crates.toml
|
||||
rm -f "${DESTDIR}"/usr/.crates2.json
|
||||
}
|
||||
Reference in New Issue
Block a user