2018-09-16 21:39:23 +02:00
|
|
|
#
|
|
|
|
# This helper is for building rust projects which use cargo for building
|
|
|
|
#
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
: ${make_cmd:=cargo}
|
|
|
|
|
2018-11-02 10:20:12 +01:00
|
|
|
${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}
|
2018-09-16 21:39:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_check() {
|
|
|
|
: ${make_cmd:=cargo}
|
|
|
|
|
2022-02-28 14:40:07 +01: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() {
|
|
|
|
: ${make_cmd:=cargo}
|
2020-04-06 09:38:29 +02:00
|
|
|
: ${make_install_args:=--path .}
|
2018-09-16 21:39:23 +02:00
|
|
|
|
2020-04-06 09:38:29 +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
|
|
|
}
|