2021-06-25 10:07:35 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE="https://helix-editor.com/"
|
|
|
|
TERMUX_PKG_DESCRIPTION="A post-modern modal text editor written in rust"
|
|
|
|
TERMUX_PKG_LICENSE="MPL-2.0"
|
2022-03-31 11:21:34 +02:00
|
|
|
TERMUX_PKG_MAINTAINER="Aditya Alok <dev.aditya.alok@gmail.com>"
|
|
|
|
TERMUX_PKG_VERSION="22.03"
|
2021-06-25 10:07:35 +02:00
|
|
|
TERMUX_PKG_SRCURL="https://github.com/helix-editor/helix.git"
|
2022-03-31 11:21:34 +02:00
|
|
|
TERMUX_PKG_GIT_BRANCH="$TERMUX_PKG_VERSION"
|
2021-06-25 10:07:35 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2022-03-31 11:21:34 +02:00
|
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
2021-06-25 10:07:35 +02:00
|
|
|
|
2021-08-14 10:39:34 +02:00
|
|
|
termux_step_make_install() {
|
2021-06-25 10:07:35 +02:00
|
|
|
termux_setup_rust
|
2021-08-20 10:39:59 +02:00
|
|
|
|
|
|
|
cargo build --jobs "${TERMUX_MAKE_PROCESSES}" --target "${CARGO_TARGET_NAME}" --release
|
2021-06-25 10:07:35 +02:00
|
|
|
|
2021-10-31 16:11:30 +01:00
|
|
|
cat >"hx" <<-EOF
|
|
|
|
#!${TERMUX_PREFIX}/bin/sh
|
2021-08-20 10:39:59 +02:00
|
|
|
|
2021-10-31 16:11:30 +01:00
|
|
|
HELIX_RUNTIME=${TERMUX_PREFIX}/lib/helix/runtime \\
|
|
|
|
exec ${TERMUX_PREFIX}/lib/helix/hx "\$@"
|
2021-06-25 10:07:35 +02:00
|
|
|
EOF
|
2021-10-31 16:11:30 +01:00
|
|
|
install -Dm744 ./hx "${TERMUX_PREFIX}/bin/hx"
|
|
|
|
install -Dm744 -t "${TERMUX_PREFIX}"/lib/helix target/"${CARGO_TARGET_NAME}"/release/hx
|
2021-08-20 10:39:59 +02:00
|
|
|
|
2022-03-31 11:21:34 +02:00
|
|
|
install -Dm644 -t "${TERMUX_PREFIX}"/lib/helix/runtime ./runtime/tutor.txt
|
|
|
|
cp -r ./runtime/{queries,themes} "${TERMUX_PREFIX}"/lib/helix/runtime
|
|
|
|
find ./runtime/grammars -maxdepth 1 -type f -name "*.so" \
|
|
|
|
-exec install -Dm744 -t "${TERMUX_PREFIX}"/lib/helix/runtime/grammars {} \;
|
2021-06-25 10:07:35 +02:00
|
|
|
}
|