add(main): new package peco

Signed-off-by: 2096779623 <admin@utermux.dev>
This commit is contained in:
2096779623 2022-07-01 12:43:42 +08:00 committed by 2096779623
parent 44d4fa844a
commit 1db47528b1
1 changed files with 25 additions and 0 deletions

25
packages/peco/build.sh Normal file
View File

@ -0,0 +1,25 @@
TERMUX_PKG_HOMEPAGE=https://github.com/peco/peco
TERMUX_PKG_DESCRIPTION="Simplistic interactive filtering tool"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.5.10"
TERMUX_PKG_SRCURL=https://github.com/peco/peco/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=781c2effc4f6a58d9ff96fb0fc8b0fba3aab56a91a34933d68c5de3aea5fe3f6
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
termux_step_pre_configure() {
termux_setup_golang
go mod init || :
go mod tidy
}
termux_step_make() {
cd "$TERMUX_PKG_SRCDIR"/cmd/peco
go build -o peco
}
termux_step_make_install() {
install -Dm700 -t "${TERMUX_PREFIX}"/bin "$TERMUX_PKG_SRCDIR"/cmd/peco/peco
}