aboutsummaryrefslogtreecommitdiffstats
path: root/community/fzf/APKBUILD
blob: dd7fc77f2505bb31bef2bcc53921f53cc1f6c1dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Contributor: Kevin Daudt <ops@ikke.info>
# Maintainer: Kevin Daudt <ops@ikke.info>
pkgname=fzf
pkgver=0.17.5
pkgrel=2
pkgdesc="A command-line fuzzy finder"
url="https://github.com/junegunn/fzf"
arch="all !s390x !aarch64 !armhf !armv7"
license="MIT"
makedepends="go glide bash tmux"
subpackages="
	$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"

prepare() {
	default_prepare
	cd "$builddir"
	export GOPATH="$startdir"
	glide install
}

build() {
	cd "$builddir"
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make install # Just copies the target binary to $buildir/bin
	install -Dm0755 bin/fzf "$pkgdir"/usr/bin/fzf
}

tmux() {
	depends="tmux bash"
	pkgdesc="Helper script to start fzf in a tmux pane"

	cd "$builddir"
	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"

	cd "$builddir"
	install -Dm0644 shell/completion.bash \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
	mkdir -p "$subpkgdir"/usr/share/fzf/
	install -m0644 shell/key-bindings.bash "$subpkgdir"/usr/share/fzf/
}

zshcomp() {
	pkgdesc="additional scripts for zsh 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
	mkdir -p "$subpkgdir"/usr/share/fzf/
	install -m0644 shell/key-bindings.zsh "$subpkgdir"/usr/share/fzf/
}

sha512sums="adb5290317362c32d053294a2dd9a2aa11711521635c1cb1fc11001dea1b06e27856a7c54e7316d211abee3304cc56b8a9ee60773bb99cb4132b533f5464a430  fzf-0.17.5.tar.gz
daa16985079e3b55ccf5e74dde356e1e13e43865c9809e432b5d272b053f541f1eacd402f3b04957ee855fb8c0ca1820b507d08e408f55dc80004990a949874c  no-glide-install.patch"