aboutsummaryrefslogtreecommitdiffstats
path: root/community/fzf
diff options
context:
space:
mode:
authorKevin Daudt <ops@ikke.info>2018-03-11 16:13:15 +0000
committerSören Tempel <soeren+git@soeren-tempel.net>2018-03-11 21:16:50 +0100
commitb58e2a954bee502453bf04c75c907488854697cc (patch)
treec1b8a343af709dd4f1beff7bb9f59d95cd72571f /community/fzf
parentd5cfcd38e93d52bef507fb0dd397f11e7a5c9f40 (diff)
downloadaports-b58e2a954bee502453bf04c75c907488854697cc.tar.bz2
aports-b58e2a954bee502453bf04c75c907488854697cc.tar.xz
community/fzf: properly split shell scripts
All the shell scripts are now bundled in a single 'extras' subpackage but standard is to create per shell subpackage. Make it so.
Diffstat (limited to 'community/fzf')
-rw-r--r--community/fzf/APKBUILD42
1 files changed, 30 insertions, 12 deletions
diff --git a/community/fzf/APKBUILD b/community/fzf/APKBUILD
index 70a479d9b7..9d71ebbc11 100644
--- a/community/fzf/APKBUILD
+++ b/community/fzf/APKBUILD
@@ -2,13 +2,18 @@
# Maintainer: Kevin Daudt <ops@ikke.info>
pkgname=fzf
pkgver="0.17.3"
-pkgrel=1
+pkgrel=2
pkgdesc="A command-line fuzzy finder"
url="https://github.com/junegunn/fzf"
arch="x86 x86_64"
license="MIT"
makedepends="go glide bash tmux"
-subpackages="$pkgname-tmux::noarch $pkgname-extras::noarch"
+subpackages="
+ $pkgname-doc
+ $pkgname-tmux::noarch
+ $pkgname-bash-completion:bashcomp:noarch
+ $pkgname-zsh-completion:zshcomp:noarch
+ "
source="$pkgname-$pkgver.tar.gz::https://github.com/junegunn/fzf/archive/$pkgver.tar.gz
no-glide-install.patch
disable-vet-for-tests.patch"
@@ -16,7 +21,7 @@ builddir="$srcdir/$pkgname-$pkgver"
prepare() {
default_prepare
-
+ cd "$builddir"
export GOPATH="$startdir"
glide install
}
@@ -33,27 +38,40 @@ check() {
package() {
cd "$builddir"
-
- # Just copies the target binary to $buildir/bin
- make install
-
+ make install # Just copies the target binary to $buildir/bin
install -Dm0755 bin/fzf "$pkgdir"/usr/bin/fzf
+
+ mkdir -p "$pkgdir"/usr/share/doc/$pkgname/examples/
+ install -m0644 shell/key-bindings.* \
+ "$pkgdir"/usr/share/doc/$pkgname/examples/
}
tmux() {
depends="tmux bash"
- description="Helper script to start fzf in a tmux pane"
+ pkgdesc="Helper script to start fzf in a tmux pane"
cd "$builddir"
install -Dm0755 bin/fzf-tmux "$subpkgdir"/usr/bin/fzf-tmux
}
-extras() {
- description="additional scripts like shell completion and keybindings"
+bashcomp() {
+ pkgdesc="additional scripts for bash like shell completion and keybindings"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ cd "$builddir"
+ install -Dm0644 shell/completion.bash \
+ "$subpkgdir"/usr/share/bash-completion/completions/$pkgname
+}
+
+zshcomp() {
+ pkgdesc="additional scripts for zsf like shell completion and keybindings"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel zsh"
cd "$builddir"
- install -dm0755 "$subpkgdir"/usr/share/fzf
- install -m0644 shell/*.$1 "$subpkgdir"/usr/share/fzf
+ install -Dm0644 shell/completion.zsh \
+ "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
}
sha512sums="2713ef7adb0dd278ac0a0c362c5cd23e7b0f1867efdfa964ad1f63f48c7f518e0cf96cc0b2571487585a0271fb0d2398edfebdbe603ec2bb42d3bd87febd2156 fzf-0.17.3.tar.gz