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
|
|
|
|
2023-04-02 12:28:59 +02:00
|
|
|
${make_cmd} build --release --target ${RUST_TARGET} ${configure_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 12:28:59 +02:00
|
|
|
${make_check_pre} ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \
|
2020-06-29 17:39:08 +02:00
|
|
|
${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
|
|
|
}
|