build-style/cargo: produce auditable binaries

This commit is contained in:
Jan Christian Grünhage 2022-11-01 22:29:59 +01:00 committed by classabbyamp
parent c5a3ba12db
commit ca8c4fb08f
2 changed files with 7 additions and 3 deletions

View File

@ -3,20 +3,20 @@
#
do_build() {
: ${make_cmd:=cargo}
: ${make_cmd:=cargo auditable}
${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}
}
do_check() {
: ${make_cmd:=cargo}
: ${make_cmd:=cargo auditable}
${make_check_pre} ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \
${make_check_args}
}
do_install() {
: ${make_cmd:=cargo}
: ${make_cmd:=cargo auditable}
: ${make_install_args:=--path .}
${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \

View File

@ -1,5 +1,9 @@
hostmakedepends+=" cargo"
if ! [[ "$pkgname" =~ ^cargo-auditable(-bootstrap)?$ ]]; then
hostmakedepends+=" cargo-auditable"
fi
if [ "$CROSS_BUILD" ]; then
makedepends+=" rust-std"
fi