build-style/cargo: produce auditable binaries
This commit is contained in:
parent
c5a3ba12db
commit
ca8c4fb08f
2 changed files with 7 additions and 3 deletions
|
@ -3,20 +3,20 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
: ${make_cmd:=cargo}
|
: ${make_cmd:=cargo auditable}
|
||||||
|
|
||||||
${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}
|
${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
: ${make_cmd:=cargo}
|
: ${make_cmd:=cargo auditable}
|
||||||
|
|
||||||
${make_check_pre} ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \
|
${make_check_pre} ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \
|
||||||
${make_check_args}
|
${make_check_args}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
: ${make_cmd:=cargo}
|
: ${make_cmd:=cargo auditable}
|
||||||
: ${make_install_args:=--path .}
|
: ${make_install_args:=--path .}
|
||||||
|
|
||||||
${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
|
${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
hostmakedepends+=" cargo"
|
hostmakedepends+=" cargo"
|
||||||
|
|
||||||
|
if ! [[ "$pkgname" =~ ^cargo-auditable(-bootstrap)?$ ]]; then
|
||||||
|
hostmakedepends+=" cargo-auditable"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
makedepends+=" rust-std"
|
makedepends+=" rust-std"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue