mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-08 11:53:25 +00:00
Some packages have issues with parallel builds and need to set TERMUX_MAKE_PROCESSES=1. All other build variables that package recipes set are prefixed with TERMUX_PKG, use that for MAKE_PROCESSES as well for consistency. %ci:no-build
29 lines
1.0 KiB
Bash
29 lines
1.0 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://github.com/tree-sitter/tree-sitter
|
|
TERMUX_PKG_DESCRIPTION="An incremental parsing system for programming tools"
|
|
TERMUX_PKG_LICENSE="MIT"
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
|
TERMUX_PKG_VERSION="0.22.6"
|
|
TERMUX_PKG_SRCURL=https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
|
TERMUX_PKG_SHA256=e2b687f74358ab6404730b7fb1a1ced7ddb3780202d37595ecd7b20a8f41861f
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
termux_step_pre_get_source() {
|
|
# Do not forget to bump revision of reverse dependencies and rebuild them
|
|
# after SOVERSION is changed.
|
|
local _SOVERSION=0
|
|
|
|
# New SO version is the major version of the package
|
|
if [[ $TERMUX_PKG_VERSION != $_SOVERSION.* ]]; then
|
|
termux_error_exit "SOVERSION guard check failed."
|
|
fi
|
|
}
|
|
|
|
termux_step_post_make_install() {
|
|
termux_setup_rust
|
|
|
|
cargo build --jobs $TERMUX_PKG_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release
|
|
|
|
install -Dm700 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/tree-sitter
|
|
}
|