2018-09-16 19:39:23 +00:00
|
|
|
#
|
|
|
|
# This helper is for building rust projects which use cargo for building
|
|
|
|
#
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
: ${make_cmd:=cargo}
|
|
|
|
|
2018-11-02 09:20:12 +00:00
|
|
|
${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}
|
2018-09-16 19:39:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_check() {
|
|
|
|
: ${make_cmd:=cargo}
|
|
|
|
|
2020-06-29 15:39:08 +00:00
|
|
|
${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \
|
|
|
|
${make_check_args}
|
2018-09-16 19:39:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
: ${make_cmd:=cargo}
|
2020-04-06 07:38:29 +00:00
|
|
|
: ${make_install_args:=--path .}
|
2018-09-16 19:39:23 +00:00
|
|
|
|
2020-04-06 07:38:29 +00:00
|
|
|
${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
|
2020-02-22 15:45:23 +00:00
|
|
|
--locked ${configure_args} ${make_install_args}
|
2020-04-06 07:38:29 +00:00
|
|
|
|
2020-02-25 09:48:44 +00:00
|
|
|
rm -f "${DESTDIR}"/usr/.crates.toml
|
|
|
|
rm -f "${DESTDIR}"/usr/.crates2.json
|
2018-09-16 19:39:23 +00:00
|
|
|
}
|