2018-09-16 21:39:23 +02:00
|
|
|
#
|
|
|
|
# This helper is for building rust projects which use cargo for building
|
|
|
|
#
|
|
|
|
|
|
|
|
do_build() {
|
2022-11-01 22:29:59 +01:00
|
|
|
: ${make_cmd:=cargo auditable}
|
2018-09-16 21:39:23 +02:00
|
|
|
|
2024-09-14 07:38:36 +02:00
|
|
|
${make_cmd} build --release --locked --target ${RUST_TARGET} \
|
|
|
|
${configure_args} ${make_build_args}
|
2018-09-16 21:39:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_check() {
|
2022-11-01 22:29:59 +01:00
|
|
|
: ${make_cmd:=cargo auditable}
|
2018-09-16 21:39:23 +02:00
|
|
|
|
2023-04-02 16:25:24 +02:00
|
|
|
${make_check_pre} ${make_cmd} test --release --locked --target ${RUST_TARGET} \
|
|
|
|
${configure_args} ${make_check_args}
|
2018-09-16 21:39:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2022-11-01 22:29:59 +01:00
|
|
|
: ${make_cmd:=cargo auditable}
|
2020-04-06 09:38:29 +02:00
|
|
|
: ${make_install_args:=--path .}
|
2018-09-16 21:39:23 +02:00
|
|
|
|
2023-04-02 12:28:59 +02:00
|
|
|
${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
|
2022-05-08 01:41:22 +02:00
|
|
|
--offline --locked ${configure_args} ${make_install_args}
|
2020-04-06 09:38:29 +02:00
|
|
|
|
2020-02-25 10:48:44 +01:00
|
|
|
rm -f "${DESTDIR}"/usr/.crates.toml
|
|
|
|
rm -f "${DESTDIR}"/usr/.crates2.json
|
2018-09-16 21:39:23 +02:00
|
|
|
}
|