2016-01-11 01:51:38 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://github.com/junegunn/fzf
|
|
|
|
TERMUX_PKG_DESCRIPTION="Command-line fuzzy finder"
|
2019-01-21 13:53:58 +01:00
|
|
|
TERMUX_PKG_LICENSE="MIT"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-04-04 20:07:17 +02:00
|
|
|
TERMUX_PKG_VERSION="0.30.0"
|
2020-04-05 19:37:58 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/junegunn/fzf/archive/${TERMUX_PKG_VERSION}.tar.gz
|
2022-04-04 20:07:17 +02:00
|
|
|
TERMUX_PKG_SHA256=a3428f510b7136e39104a002f19b2e563090496cb5205fa2e4c5967d34a20124
|
2021-10-04 12:43:31 +02:00
|
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
2019-05-02 02:03:02 +02:00
|
|
|
|
2017-02-20 04:34:13 +01:00
|
|
|
# Depend on findutils as fzf uses the -fstype option, which busybox
|
|
|
|
# find does not support, when invoking find:
|
|
|
|
TERMUX_PKG_DEPENDS="bash, findutils"
|
2016-01-11 01:51:38 +01:00
|
|
|
|
2019-08-08 14:25:54 +02:00
|
|
|
termux_step_pre_configure() {
|
|
|
|
# Certain packages are not safe to build on device because their
|
|
|
|
# build.sh script deletes specific files in $TERMUX_PREFIX.
|
2019-08-12 17:28:41 +02:00
|
|
|
if $TERMUX_ON_DEVICE_BUILD; then
|
2019-08-08 14:25:54 +02:00
|
|
|
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-07-10 10:09:47 +02:00
|
|
|
termux_step_make() {
|
2019-05-02 02:03:02 +02:00
|
|
|
termux_setup_golang
|
|
|
|
|
|
|
|
export GOPATH=$TERMUX_PKG_BUILDDIR
|
|
|
|
|
|
|
|
mkdir -p $GOPATH/src/github.com/junegunn
|
2019-09-03 21:46:21 +02:00
|
|
|
mv $TERMUX_PKG_SRCDIR $GOPATH/src/github.com/junegunn/fzf
|
|
|
|
TERMUX_PKG_SRCDIR=$GOPATH/src/github.com/junegunn/fzf
|
2019-05-02 02:03:02 +02:00
|
|
|
|
|
|
|
cd $GOPATH/src/github.com/junegunn/fzf
|
2021-07-10 16:00:18 +02:00
|
|
|
go get -d -v github.com/junegunn/fzf
|
2019-05-02 02:03:02 +02:00
|
|
|
go build
|
2017-07-10 10:09:47 +02:00
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_make_install() {
|
2019-05-02 02:03:02 +02:00
|
|
|
cd $GOPATH/src/github.com/junegunn/fzf
|
2017-02-20 04:34:13 +01:00
|
|
|
|
2019-05-02 02:03:02 +02:00
|
|
|
install -Dm700 fzf $TERMUX_PREFIX/bin/fzf
|
2016-01-11 01:51:38 +01:00
|
|
|
|
|
|
|
# Install fzf-tmux, a bash script for launching fzf in a tmux pane:
|
2019-05-02 02:03:02 +02:00
|
|
|
install -Dm700 $TERMUX_PKG_SRCDIR/bin/fzf-tmux $TERMUX_PREFIX/bin/fzf-tmux
|
2016-01-11 01:51:38 +01:00
|
|
|
|
|
|
|
# Install the fzf.1 man page:
|
|
|
|
mkdir -p $TERMUX_PREFIX/share/man/man1/
|
|
|
|
cp $TERMUX_PKG_SRCDIR/man/man1/fzf.1 $TERMUX_PREFIX/share/man/man1/
|
|
|
|
|
2018-09-14 20:59:52 +02:00
|
|
|
# Install the rest of the shell scripts:
|
2019-05-02 02:03:02 +02:00
|
|
|
mkdir -p $TERMUX_PREFIX/share/fzf
|
|
|
|
cp $TERMUX_PKG_SRCDIR/shell/* $TERMUX_PREFIX/share/fzf/
|
2021-08-06 23:08:41 +02:00
|
|
|
|
|
|
|
# Symlink shell completions.
|
|
|
|
mkdir -p $TERMUX_PREFIX/share/bash-completion/completions/
|
|
|
|
ln -sfr $TERMUX_PREFIX/share/fzf/completion.bash $TERMUX_PREFIX/share/bash-completion/completions/fzf
|
|
|
|
mkdir -p $TERMUX_PREFIX/share/zsh/site-functions
|
|
|
|
ln -sfr $TERMUX_PREFIX/share/fzf/completion.zsh $TERMUX_PREFIX/share/zsh/site-functions/_fzf
|
|
|
|
|
|
|
|
# Fish keybindings.
|
|
|
|
mkdir -p $TERMUX_PREFIX/share/fish/vendor_functions.d
|
|
|
|
ln -sfr $TERMUX_PREFIX/share/fzf/key-bindings.fish $TERMUX_PREFIX/share/fish/vendor_functions.d/fzf_key_bindings.fish
|
2016-08-19 14:10:27 +02:00
|
|
|
|
2016-01-11 01:51:38 +01:00
|
|
|
# Install the nvim plugin:
|
|
|
|
mkdir -p $TERMUX_PREFIX/share/nvim/runtime/plugin
|
|
|
|
cp $TERMUX_PKG_SRCDIR/plugin/fzf.vim $TERMUX_PREFIX/share/nvim/runtime/plugin/
|
|
|
|
}
|