From ca3d20c9e4235fe7a80bb0b397542442269bf7ac Mon Sep 17 00:00:00 2001 From: Shadman Date: Mon, 7 Jun 2021 19:17:23 +0600 Subject: [PATCH] Add package: rust-analyzer (#6967) * Adding package rust-analyzer * remove TERMUX_REVISION from rust-analyzer * Add both MIT & APACHE licence for rust-analyzer * Fix version string --- packages/rust-analyzer/build.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 packages/rust-analyzer/build.sh diff --git a/packages/rust-analyzer/build.sh b/packages/rust-analyzer/build.sh new file mode 100644 index 000000000..2f93f2848 --- /dev/null +++ b/packages/rust-analyzer/build.sh @@ -0,0 +1,18 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/rust-analyzer/rust-analyzer +TERMUX_PKG_DESCRIPTION="A Rust compiler front-end for IDEs" +TERMUX_PKG_LICENSE="MIT, Apache-2.0" +TERMUX_PKG_LICENSE_FILE="LICENSE-MIT, LICENSE-APACHE" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION=20210607 +TERMUX_PKG_SRCURL=https://github.com/rust-analyzer/rust-analyzer/archive/refs/tags/${TERMUX_PKG_VERSION:0:4}-${TERMUX_PKG_VERSION:4:2}-${TERMUX_PKG_VERSION:6:2}.tar.gz +TERMUX_PKG_SHA256=55bdc9e0c3945c565892efbcb34551ec14e21f11336f5c8d862296b658bb7296 +TERMUX_PKG_BUILD_IN_SRC=true + +termux_step_make() { + termux_setup_rust + cargo build --jobs $TERMUX_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release +} + +termux_step_make_install() { + install -Dm755 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/rust-analyzer +}