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.
This commit is contained in:
Kevin Daudt 2018-03-11 16:13:15 +00:00 committed by Sören Tempel
parent d5cfcd38e9
commit b58e2a954b

View File

@ -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 -dm0755 "$subpkgdir"/usr/share/fzf
install -m0644 shell/*.$1 "$subpkgdir"/usr/share/fzf
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 -Dm0644 shell/completion.zsh \
"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
}
sha512sums="2713ef7adb0dd278ac0a0c362c5cd23e7b0f1867efdfa964ad1f63f48c7f518e0cf96cc0b2571487585a0271fb0d2398edfebdbe603ec2bb42d3bd87febd2156 fzf-0.17.3.tar.gz