Skip to content

Commit 9e58781

Browse files
fix(main/harper): use correct target OS for cargo build
Without setting the target, cargo would default to the hosts target. For the termux github actions build system, this means all targets would build for GNU/Linux, as this is the host system OS. This made all the packages unusable.
1 parent 332ee64 commit 9e58781

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/harper/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ TERMUX_PKG_SRCURL="https://github.com/Automattic/harper/archive/refs/tags/v${TER
77
TERMUX_PKG_SHA256=9cd55f642eb17c2a1c7e8bfb9f958fe5ea165ec98264b7ce568bedbc32dc8b18
88
TERMUX_PKG_AUTO_UPDATE=true
99
TERMUX_PKG_BUILD_IN_SRC=true
10+
TERMUX_PKG_REVISION=1
1011

1112
termux_step_pre_configure() {
1213
termux_setup_rust
@@ -28,9 +29,9 @@ termux_step_pre_configure() {
2829
}
2930

3031
termux_step_make() {
31-
cargo build --release --manifest-path $TERMUX_PKG_BUILDDIR/harper-ls/Cargo.toml
32+
cargo build --release --manifest-path $TERMUX_PKG_BUILDDIR/harper-ls/Cargo.toml --target "${CARGO_TARGET_NAME}"
3233
}
3334

3435
termux_step_make_install() {
35-
install -Dm700 target/release/harper-ls "${TERMUX_PREFIX}"/bin/harper-ls
36+
install -Dm700 target/"${CARGO_TARGET_NAME}"/release/harper-ls "${TERMUX_PREFIX}"/bin/harper-ls
3637
}

0 commit comments

Comments
 (0)