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}
|
|
|
|
|
|
|
|
${make_cmd} test --release ${make_check_args}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
: ${make_cmd:=cargo}
|
|
|
|
|
2018-11-02 09:20:12 +00:00
|
|
|
${make_cmd} install --path . --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
|
2019-09-25 22:52:51 +00:00
|
|
|
--locked ${make_install_args}
|
2018-09-16 19:39:23 +00:00
|
|
|
rm "${DESTDIR}"/usr/.crates.toml
|
|
|
|
}
|