aboutsummaryrefslogtreecommitdiffstats
path: root/community/fzf/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/fzf/APKBUILD')
-rw-r--r--community/fzf/APKBUILD112
1 files changed, 56 insertions, 56 deletions
diff --git a/community/fzf/APKBUILD b/community/fzf/APKBUILD
index 31c6bf638f3..d1b828d6e09 100644
--- a/community/fzf/APKBUILD
+++ b/community/fzf/APKBUILD
@@ -2,43 +2,35 @@
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=fzf
-pkgver=0.20.0
-pkgrel=0
+pkgver=0.49.0
+pkgrel=1
pkgdesc="A command-line fuzzy finder"
url="https://github.com/junegunn/fzf"
arch="all"
license="MIT"
-makedepends="go glide bash tmux"
-options="net"
+makedepends="go bash"
+options="net chmod-clean"
subpackages="
$pkgname-tmux::noarch
- $pkgname-bash-completion:bashcomp:noarch
- $pkgname-zsh-completion:zshcomp:noarch
+ $pkgname-bash-plugin:_bash:noarch
+ $pkgname-zsh-plugin:_zsh:noarch
+ $pkgname-fish-plugin:_fish:noarch
$pkgname-vim:vim:noarch
$pkgname-neovim:nvim:noarch
$pkgname-doc
"
+install="$pkgname.post-upgrade"
source="$pkgname-$pkgver.tar.gz::https://github.com/junegunn/fzf/archive/$pkgver.tar.gz
- glide.yaml
- glide.lock
- find-buzybox-compat.patch
+ $pkgname.plugin.sh
+ $pkgname.plugin.zsh
"
-builddir="$srcdir/src/github.com/junegunn/$pkgname"
-prepare() {
- export GOPATH="$srcdir"
-
- mkdir -p "$(dirname "$builddir")"
- mv "$srcdir"/$pkgname-$pkgver "$builddir"/
-
- cp "$srcdir"/glide.yaml "$srcdir"/glide.lock "$builddir"
- glide install --skip-test
-
- default_prepare
-}
+export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
+export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
+export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
- go build
+ go build -ldflags "-X main.version=$pkgver -X main.revision=AlpineLinux"
}
check() {
@@ -55,10 +47,6 @@ package() {
install -D man/man1/fzf.1 "$pkgdir"/usr/share/man/man1/fzf.1
install -D man/man1/fzf-tmux.1 "$pkgdir"/usr/share/man/man1/fzf-tmux.1
-
- mkdir -p "$pkgdir"/usr/share/doc/$pkgname
- install -Dm644 CHANGELOG.md README-VIM.md README.md \
- "$pkgdir"/usr/share/doc
}
tmux() {
@@ -69,45 +57,62 @@ tmux() {
install -Dm0755 bin/fzf-tmux "$subpkgdir"/usr/bin/fzf-tmux
}
-bashcomp() {
- pkgdesc="additional scripts for bash like shell completion and keybindings"
- depends=""
- install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+_bash() {
+ pkgdesc="Bash plugin for $pkgname (completion and key bindings)"
+ depends="perl"
+ install_if="$pkgname=$pkgver-r$pkgrel bash"
+ # For backward compatibility (Alpine <3.16).
+ replaces="$pkgname-bash-completion<0.29.0-r4"
cd "$builddir"
- install -Dm0644 shell/completion.bash \
- "$subpkgdir"/usr/share/bash-completion/completions/$pkgname
+
+ install -D -m644 shell/*.bash "$srcdir"/$pkgname.plugin.sh \
+ -t "$subpkgdir"/usr/share/bash/plugins/$pkgname/
+
+ # For backward compatibility (Alpine <3.16).
mkdir -p "$subpkgdir"/usr/share/fzf/
- install -m0644 shell/key-bindings.bash "$subpkgdir"/usr/share/fzf/
+ ln -s ../bash/plugins/$pkgname/key-bindings.bash "$subpkgdir"/usr/share/fzf/
}
-zshcomp() {
- pkgdesc="additional scripts for zsh like shell completion and keybindings"
+_zsh() {
+ pkgdesc="Zsh plugin for $pkgname (completion and key bindings)"
depends=""
install_if="$pkgname=$pkgver-r$pkgrel zsh"
+ # For backward compatibility (Alpine <3.16).
+ replaces="$pkgname-zsh-completion<0.29.0-r4"
cd "$builddir"
- install -Dm0644 shell/completion.zsh \
- "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
+
+ install -D -m644 shell/*.zsh "$srcdir"/$pkgname.plugin.zsh \
+ -t "$subpkgdir"/usr/share/zsh/plugins/$pkgname/
+
+ # For backward compatibility (Alpine <3.16).
mkdir -p "$subpkgdir"/usr/share/fzf/
- install -m0644 shell/key-bindings.zsh "$subpkgdir"/usr/share/fzf/
+ ln -s ../zsh/plugins/$pkgname/key-bindings.zsh "$subpkgdir"/usr/share/fzf/
}
-glide_init() {
- abuild clean deps unpack prepare
+_fish() {
+ pkgdesc="Fish key bindings for $pkgname"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel fish"
+ # For backward compatibility (Alpine <3.16).
+ replaces="$pkgname-fish-completion<0.29.0-r4"
+
cd "$builddir"
- export GOPATH="$startdir"
- rm -f glide.yaml glide.lock
- glide init --non-interactive
- glide update
- cp glide.yaml glide.lock "$startdir"
- cd "$startdir" && abuild checksum clean
+ install -D -m644 shell/key-bindings.fish \
+ "$subpkgdir"/usr/share/fish/vendor_functions.d/$pkgname-key-bindings.fish
+
+ # For backward compatibility (Alpine <3.16).
+ mkdir -p "$subpkgdir"/usr/share/fzf/
+ ln -s ../fish/vendor_functions.d/$pkgname-key-bindings.fish "$subpkgdir"/usr/share/fzf/
}
vim() {
pkgdesc="fzf vim plugin"
install="$pkgname-vim.post-install"
install_if="$pkgname=$pkgver-r$pkgrel vim"
+ depends="vim"
+
cd "$builddir"
install -Dm0644 plugin/fzf.vim "$subpkgdir"/usr/share/vim/vimfiles/plugin/fzf.vim
install -Dm0644 doc/fzf.txt "$subpkgdir"/usr/share/vim/vimfiles/doc/fzf.txt
@@ -121,13 +126,8 @@ nvim() {
install -Dm0644 doc/fzf.txt "$subpkgdir"/usr/share/nvim/runtime/doc/fzf.txt
}
-cleanup_srcdir() {
- export GOPATH="$srcdir"
- go clean -modcache
- default_cleanup_srcdir
-}
-
-sha512sums="a65294d29c59353d17468a919878f965934540eea27441292a7219aea7509c18ea31ed1d58453f890a43026e4ae58946e0122d49475e734bd9354a0e520d99e7 fzf-0.20.0.tar.gz
-dc14dea17ea585344e16eeffdc244693d97f4519676d20ec43434f6eff460d61be833399469ccb44c25c9fed296d52d424208c4a4cae5a3beecba14593cecd49 glide.yaml
-5d1c0801d79a0425e1ec02c818bf440f2201841f356f32350fac06bf3ed7a7d03c0718cbeadc07143701895152f7ee19919e6e527be9e17c0df430f93d0282c9 glide.lock
-8e905eaaa915373162e418416026c20138442cfc740b55b33d63653078a19d8aec6d7c99c12916c44443eab188a56a9b3466763c508de7d6579bd996b0af5d67 find-buzybox-compat.patch"
+sha512sums="
+fe9d380e1fba460a45ce70a3b44681454833243881a133108f9087a204b1adaafae7bc13e083d25bc783eedb7d4998d5f2301c87f981c0368d081f7f60107fe8 fzf-0.49.0.tar.gz
+a13ba25c08fe5b54231508be8d2f0a9f4d342630e6c31f2524cc6b8b99cead5b80daa2e2e37a581198f9ce79df2b00fdf81acf84fe1ad8043ee96e4db0870ee6 fzf.plugin.sh
+4ea4a5511704ef6fe57e7d3187739ba501ddb80d249738310d773edd9e2d08c26d27ec0c8976320e979aa8688984fe591b63a63b3c8589d5b80190e7d85d1c8b fzf.plugin.zsh
+"