Subject: [alpine-aports] [PATCH] community/fzf: Add neovim subpackage

From: Matt Hill <[email-masked]>
Date: Tue, 5 Mar 2019 16:00:38 +0000

https://github.com/junegunn/fzf/blob/master/README-VIM.md
Basic integration for Neovim
---
 community/fzf/APKBUILD | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/community/fzf/APKBUILD b/community/fzf/APKBUILD
index dd7fc77f25..908b1b5eb4 100644
--- a/community/fzf/APKBUILD
+++ b/community/fzf/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Kevin Daudt <[email-masked]>
 pkgname=fzf
 pkgver=0.17.5
-pkgrel=2
+pkgrel=3
 pkgdesc="A command-line fuzzy finder"
 url="https://github.com/junegunn/fzf"
 arch="all !s390x !aarch64 !armhf !armv7"
@@ -12,6 +12,7 @@ subpackages="
 	$pkgname-tmux::noarch
 	$pkgname-bash-completion:bashcomp:noarch
 	$pkgname-zsh-completion:zshcomp:noarch
+	$pkgname-neovim:nvim:noarch
 	"
 source="$pkgname-$pkgver.tar.gz::https://github.com/junegunn/fzf/archive/$pkgver.tar.gz
 	no-glide-install.patch"
@@ -71,5 +72,12 @@ zshcomp() {
 	install -m0644 shell/key-bindings.zsh "$subpkgdir"/usr/share/fzf/
 }
 
+nvim() {
+	pkgdesc="fzf vim plugin"
+	cd "$builddir"
+	mkdir -p "$subpkgdir"/usr/share/nvim/runtime/plugin/
+	install -Dm0644 plugin/fzf.vim "$subpkgdir"/usr/share/nvim/runtime/plugin/
+}
+
 sha512sums="adb5290317362c32d053294a2dd9a2aa11711521635c1cb1fc11001dea1b06e27856a7c54e7316d211abee3304cc56b8a9ee60773bb99cb4132b533f5464a430  fzf-0.17.5.tar.gz
 daa16985079e3b55ccf5e74dde356e1e13e43865c9809e432b5d272b053f541f1eacd402f3b04957ee855fb8c0ca1820b507d08e408f55dc80004990a949874c  no-glide-install.patch"
-- 
2.20.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Chloe Kudryavtsev <[email-masked]>
Date: Tue, 5 Mar 2019 15:54:09 -0500

> +	install -Dm0644 plugin/fzf.vim "$subpkgdir"/usr/share/nvim/runtime/plugin/

Shouldn't this be s/nvim/vim/?
Iirc, nvim can take advantage of vim's runtime, but not vice-versa.
The plugin works for both, so we should either install the file twice, 
or once, but for vim.

Also, I'd imagine we want an install_if, so it's autoinstalled when 
vim/nvim *and* fzf are installed.
(note that the above is an argument for having two subpackages).

---

---

From: Matt Hill <[email-masked]>
Date: Thu, 7 Mar 2019 12:55:47 +0000

https://github.com/junegunn/fzf/blob/master/README-VIM.md
Basic integration for Vim/Neovim
---
Separate packages for vim and neovim seems better to me - if you're
using neovim, you're not likely to be using vim too.  Well, I don't
anyway.

Also added an `install_if` for each.

 community/fzf/APKBUILD | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/community/fzf/APKBUILD b/community/fzf/APKBUILD
index dd7fc77f25..d0098adf9e 100644
--- a/community/fzf/APKBUILD
+++ b/community/fzf/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Kevin Daudt <[email-masked]>
 pkgname=fzf
 pkgver=0.17.5
-pkgrel=2
+pkgrel=3
 pkgdesc="A command-line fuzzy finder"
 url="https://github.com/junegunn/fzf"
 arch="all !s390x !aarch64 !armhf !armv7"
@@ -12,6 +12,8 @@ subpackages="
 	$pkgname-tmux::noarch
 	$pkgname-bash-completion:bashcomp:noarch
 	$pkgname-zsh-completion:zshcomp:noarch
+	$pkgname-vim:vim:noarch
+	$pkgname-neovim:nvim:noarch
 	"
 source="$pkgname-$pkgver.tar.gz::https://github.com/junegunn/fzf/archive/$pkgver.tar.gz
 	no-glide-install.patch"
@@ -71,5 +73,21 @@ zshcomp() {
 	install -m0644 shell/key-bindings.zsh "$subpkgdir"/usr/share/fzf/
 }
 
+vim() {
+	pkgdesc="fzf vim plugin"
+	install_if="$pkgname=$pkgver-r$pkgrel vim"
+	cd "$builddir"
+	mkdir -p "$subpkgdir"/usr/share/vim/vimfiles/plugin/
+	install -Dm0644 plugin/fzf.vim "$subpkgdir"/usr/share/vim/vimfiles/plugin/
+}
+
+nvim() {
+	pkgdesc="fzf vim plugin for neovim"
+	install_if="$pkgname=$pkgver-r$pkgrel neovim"
+	cd "$builddir"
+	mkdir -p "$subpkgdir"/usr/share/nvim/runtime/plugin/
+	install -Dm0644 plugin/fzf.vim "$subpkgdir"/usr/share/nvim/runtime/plugin/
+}
+
 sha512sums="adb5290317362c32d053294a2dd9a2aa11711521635c1cb1fc11001dea1b06e27856a7c54e7316d211abee3304cc56b8a9ee60773bb99cb4132b533f5464a430  fzf-0.17.5.tar.gz
 daa16985079e3b55ccf5e74dde356e1e13e43865c9809e432b5d272b053f541f1eacd402f3b04957ee855fb8c0ca1820b507d08e408f55dc80004990a949874c  no-glide-install.patch"
-- 
2.20.1

---

---

From: Leonardo <[email-masked]>
Date: Wed, 3 Apr 2019 16:31:35 +0200

Hi,

sorry for the late reply.

>   1 file changed, 19 insertions(+), 1 deletion(-)

It needs to be rebased against latest HEAD.

Thanks!

/eo

---

---

From: Matt Hill <[email-masked]>
Date: Thu, 4 Apr 2019 12:18:32 +0100

https://github.com/junegunn/fzf/blob/master/README-VIM.md
Basic integration for Vim/Neovim
---
Rebased on to latest HEAD

 community/fzf/APKBUILD | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/community/fzf/APKBUILD b/community/fzf/APKBUILD
index 055cb499bb..102417ae18 100644
--- a/community/fzf/APKBUILD
+++ b/community/fzf/APKBUILD
@@ -12,6 +12,8 @@ subpackages="
 	$pkgname-tmux::noarch
 	$pkgname-bash-completion:bashcomp:noarch
 	$pkgname-zsh-completion:zshcomp:noarch
+	$pkgname-vim:vim:noarch
+	$pkgname-neovim:nvim:noarch
 	"
 source="$pkgname-$pkgver.tar.gz::https://github.com/junegunn/fzf/archive/$pkgver.tar.gz
 	glide.yaml
@@ -90,6 +92,22 @@ glide_init() {
 	cd "$startdir" && abuild checksum clean
 }
 
+vim() {
+	pkgdesc="fzf vim plugin"
+	install_if="$pkgname=$pkgver-r$pkgrel vim"
+	cd "$builddir"
+	mkdir -p "$subpkgdir"/usr/share/vim/vimfiles/plugin/
+	install -Dm0644 plugin/fzf.vim "$subpkgdir"/usr/share/vim/vimfiles/plugin/
+}
+
+nvim() {
+	pkgdesc="fzf vim plugin for neovim"
+	install_if="$pkgname=$pkgver-r$pkgrel neovim"
+	cd "$builddir"
+	mkdir -p "$subpkgdir"/usr/share/nvim/runtime/plugin/
+	install -Dm0644 plugin/fzf.vim "$subpkgdir"/usr/share/nvim/runtime/plugin/
+}
+
 sha512sums="70dcda693ed6706f232874550f89cfcdbce1d28360244a728dd0640a4cfbbbd0899601f42c9096197c159cde86e89d287a06905cb5d665bd09b9d01cca2cb754  fzf-0.18.0.tar.gz
 dc14dea17ea585344e16eeffdc244693d97f4519676d20ec43434f6eff460d61be833399469ccb44c25c9fed296d52d424208c4a4cae5a3beecba14593cecd49  glide.yaml
 5d1c0801d79a0425e1ec02c818bf440f2201841f356f32350fac06bf3ed7a7d03c0718cbeadc07143701895152f7ee19919e6e527be9e17c0df430f93d0282c9  glide.lock"
-- 
2.20.1

---

---

From: Leonardo <[email-masked]>
Date: Fri, 5 Apr 2019 14:14:24 +0200

Hi,

> Rebased on to latest HEAD

bumped pkgrel and pushed.

Thanks!

/eo

---