mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 13:57:14 +02:00
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:
parent
d5cfcd38e9
commit
b58e2a954b
@ -2,13 +2,18 @@
|
|||||||
# Maintainer: Kevin Daudt <ops@ikke.info>
|
# Maintainer: Kevin Daudt <ops@ikke.info>
|
||||||
pkgname=fzf
|
pkgname=fzf
|
||||||
pkgver="0.17.3"
|
pkgver="0.17.3"
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="A command-line fuzzy finder"
|
pkgdesc="A command-line fuzzy finder"
|
||||||
url="https://github.com/junegunn/fzf"
|
url="https://github.com/junegunn/fzf"
|
||||||
arch="x86 x86_64"
|
arch="x86 x86_64"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
makedepends="go glide bash tmux"
|
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
|
source="$pkgname-$pkgver.tar.gz::https://github.com/junegunn/fzf/archive/$pkgver.tar.gz
|
||||||
no-glide-install.patch
|
no-glide-install.patch
|
||||||
disable-vet-for-tests.patch"
|
disable-vet-for-tests.patch"
|
||||||
@ -16,7 +21,7 @@ builddir="$srcdir/$pkgname-$pkgver"
|
|||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
default_prepare
|
default_prepare
|
||||||
|
cd "$builddir"
|
||||||
export GOPATH="$startdir"
|
export GOPATH="$startdir"
|
||||||
glide install
|
glide install
|
||||||
}
|
}
|
||||||
@ -33,27 +38,40 @@ check() {
|
|||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$builddir"
|
cd "$builddir"
|
||||||
|
make install # Just copies the target binary to $buildir/bin
|
||||||
# Just copies the target binary to $buildir/bin
|
|
||||||
make install
|
|
||||||
|
|
||||||
install -Dm0755 bin/fzf "$pkgdir"/usr/bin/fzf
|
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() {
|
tmux() {
|
||||||
depends="tmux bash"
|
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"
|
cd "$builddir"
|
||||||
install -Dm0755 bin/fzf-tmux "$subpkgdir"/usr/bin/fzf-tmux
|
install -Dm0755 bin/fzf-tmux "$subpkgdir"/usr/bin/fzf-tmux
|
||||||
}
|
}
|
||||||
|
|
||||||
extras() {
|
bashcomp() {
|
||||||
description="additional scripts like shell completion and keybindings"
|
pkgdesc="additional scripts for bash like shell completion and keybindings"
|
||||||
|
depends=""
|
||||||
|
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
|
||||||
|
|
||||||
cd "$builddir"
|
cd "$builddir"
|
||||||
install -dm0755 "$subpkgdir"/usr/share/fzf
|
install -Dm0644 shell/completion.bash \
|
||||||
install -m0644 shell/*.$1 "$subpkgdir"/usr/share/fzf
|
"$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
|
sha512sums="2713ef7adb0dd278ac0a0c362c5cd23e7b0f1867efdfa964ad1f63f48c7f518e0cf96cc0b2571487585a0271fb0d2398edfebdbe603ec2bb42d3bd87febd2156 fzf-0.17.3.tar.gz
|
||||||
|
Loading…
Reference in New Issue
Block a user