chore(main/procs): Install shell completions and man page

This commit is contained in:
Biswapriyo Nath 2024-03-31 05:22:38 +00:00 committed by Chongyun Lee
parent c3f87266f9
commit 034832c5c7
1 changed files with 16 additions and 0 deletions

View File

@ -3,8 +3,10 @@ TERMUX_PKG_DESCRIPTION="A modern replacement for ps"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.14.5"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/dalance/procs/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=539b88565c775a106063da5cc5148cfdc7e010534f3dbc90cb8f6317d51ca96b
TERMUX_PKG_BUILD_DEPENDS="asciidoctor"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
@ -12,8 +14,22 @@ TERMUX_PKG_AUTO_UPDATE=true
termux_step_make() {
termux_setup_rust
cargo build --jobs $TERMUX_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release
asciidoctor -b manpage man/procs.1.adoc
}
termux_step_make_install() {
install -Dm700 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/procs
install -Dm644 man/procs.1 "$TERMUX_PREFIX"/share/man/man1/procs.1
install -Dm644 /dev/null "$TERMUX_PREFIX"/share/bash-completion/completions/procs
install -Dm644 /dev/null "$TERMUX_PREFIX"/share/zsh/site-functions/_procs
install -Dm644 /dev/null "$TERMUX_PREFIX"/share/fish/vendor_completions.d/procs.fish
}
termux_step_create_debscripts() {
cat <<-EOF >./postinst
#!${TERMUX_PREFIX}/bin/sh
procs --gen-completion-out bash > ${TERMUX_PREFIX}/share/bash-completion/completions/procs
procs --gen-completion-out zsh > ${TERMUX_PREFIX}/share/zsh/site-functions/_procs
procs --gen-completion-out fish > ${TERMUX_PREFIX}/share/fish/vendor_completions.d/procs.fish
EOF
}