Swapspace: update to 1.18.1
[void-pkg.git] / common / build-style / cargo.sh
blobdb5a3b9c9f6bd5024ebe08524ff684ff07d08e35
2 # This helper is for building rust projects which use cargo for building
5 do_build() {
6 : ${make_cmd:=cargo auditable}
8 ${make_cmd} build --release --locked --target ${RUST_TARGET} \
9 ${configure_args} ${make_build_args}
12 do_check() {
13 : ${make_cmd:=cargo auditable}
15 ${make_check_pre} ${make_cmd} test --release --locked --target ${RUST_TARGET} \
16 ${configure_args} ${make_check_args}
19 do_install() {
20 : ${make_cmd:=cargo auditable}
21 : ${make_install_args:=--path .}
23 ${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
24 --offline --locked ${configure_args} ${make_install_args}
26 rm -f "${DESTDIR}"/usr/.crates.toml
27 rm -f "${DESTDIR}"/usr/.crates2.json