void-packages/common/build-style/cargo.sh
travankor 3842294972 build-style/cargo.sh: append configure_args to cargo install
Cargo will only activate the default features for a package.
Instead, pass the correct features to cargo install.
2020-02-22 19:09:05 +01:00

23 lines
478 B
Bash

#
# This helper is for building rust projects which use cargo for building
#
do_build() {
: ${make_cmd:=cargo}
${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}
}
do_check() {
: ${make_cmd:=cargo}
${make_cmd} test --release ${make_check_args}
}
do_install() {
: ${make_cmd:=cargo}
${make_cmd} install --path . --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
--locked ${configure_args} ${make_install_args}
rm "${DESTDIR}"/usr/.crates.toml
}