summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD96
-rw-r--r--fzf.install26
-rw-r--r--key-bindings.bash.patch11
-rw-r--r--key-bindings.zsh.patch12
5 files changed, 179 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a65a71514ebe
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+# Generated by mksrcinfo v8
+# Thu Dec 10 04:24:49 UTC 2015
+pkgbase = fzf-git
+ pkgdesc = Command-line fuzzy finder
+ pkgver = 20151209
+ pkgrel = 1
+ url = https://github.com/junegunn/fzf
+ install = fzf.install
+ arch = armv6h
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = go
+ makedepends = make
+ depends = ncurses
+ optdepends = fish: fish keybindings
+ optdepends = fzf-extras: fzf keybindings from junegunn wiki and dotfiles
+ optdepends = tmux: fzf-tmux script for launching fzf in a tmux pane
+ optdepends = vim-fzf: vim plugin
+ optdepends = zsh: zsh keybindings
+ provides = fzf
+ conflicts = fzf
+ source = git+https://github.com/junegunn/fzf
+ source = git+https://github.com/junegunn/fzf.wiki
+ source = key-bindings.bash.patch
+ source = key-bindings.zsh.patch
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = fc981d036d85d0b9a5e6ba65f84b1c0f86bcee2dabb09238e1edfa1f49a85b63
+ sha256sums = 0b89bf1d6d372b9a8d5927e58151157d42848086a252979006b89b72242c52e6
+
+pkgname = fzf-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..deaca2dcd290
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,96 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+# Contributor: foalsrock <foalsrock at gmail dot-com>
+# Contributor: jebaum <jebaum at ucla dot edu>
+
+pkgname=fzf-git
+pkgver=20151209
+pkgrel=1
+pkgdesc="Command-line fuzzy finder"
+arch=('armv6h' 'i686' 'x86_64')
+depends=('ncurses')
+makedepends=('git' 'go' 'make')
+optdepends=('fish: fish keybindings'
+ 'fzf-extras: fzf keybindings from junegunn wiki and dotfiles'
+ 'tmux: fzf-tmux script for launching fzf in a tmux pane'
+ 'vim-fzf: vim plugin'
+ 'zsh: zsh keybindings')
+url="https://github.com/junegunn/fzf"
+license=('MIT')
+source=(git+https://github.com/junegunn/fzf
+ git+https://github.com/junegunn/${pkgname%-git}.wiki
+ key-bindings.bash.patch
+ key-bindings.zsh.patch)
+sha256sums=('SKIP'
+ 'SKIP'
+ 'fc981d036d85d0b9a5e6ba65f84b1c0f86bcee2dabb09238e1edfa1f49a85b63'
+ '0b89bf1d6d372b9a8d5927e58151157d42848086a252979006b89b72242c52e6')
+provides=('fzf')
+conflicts=('fzf')
+install=fzf.install
+
+pkgver() {
+ cd ${pkgname%-git}
+ git log -1 --format="%cd" --date=short | sed "s|-||g"
+}
+
+prepare() {
+ cd ${pkgname%-git}
+
+ msg2 'Fixing bash and zsh key bindings...'
+
+ msg2 'Making fzf key-bindings.bash source bash completions...'
+ patch -p1 < "$srcdir/key-bindings.bash.patch"
+
+ msg2 'Making fzf key-bindings.zsh source zsh completions...'
+ patch -p1 < "$srcdir/key-bindings.zsh.patch"
+
+ msg2 'Removing instances of "source ~/.fzf.bash"...'
+ sed -i 's@source ~/.fzf.bash;\s@@' shell/key-bindings.bash
+
+ msg2 'Removing instances of "source ~/.fzf.zsh"...'
+ sed -i 's@source ~/.fzf.zsh;\s@@' shell/key-bindings.zsh
+}
+
+build() {
+ cd ${pkgname%-git}
+
+ msg2 'Building...'
+ GOPATH="$srcdir" TMPDIR=/tmp go get -u github.com/junegunn/fzf/...
+}
+
+package() {
+ cd ${pkgname%-git}
+
+ msg2 'Installing documentation...'
+ for _doc in README.md install uninstall; do
+ install -Dm 644 $_doc -t "$pkgdir/usr/share/doc/fzf"
+ done
+
+ msg2 'Installing wiki...'
+ cp -dpr --no-preserve=ownership "$srcdir/fzf.wiki" \
+ "$pkgdir/usr/share/doc/fzf/wiki"
+
+ msg2 'Installing manual...'
+ install -Dm 644 "man/man1/fzf.1" -t "$pkgdir/usr/share/man/man1"
+
+ msg2 'Installing executables...'
+ install -Dm 755 "$srcdir/bin/fzf" -t "$pkgdir/usr/bin"
+ install -Dm 755 "bin/fzf-tmux" -t "$pkgdir/usr/bin"
+
+ msg2 'Installing bash completion and keybindings...'
+ install -Dm 644 "shell/completion.bash" \
+ "$pkgdir/usr/share/bash-completion/completions/fzf"
+ install -Dm 755 "shell/key-bindings.bash" "$pkgdir/etc/profile.d/fzf.bash"
+
+ msg2 'Installing fish keybindings...'
+ install -Dm 644 "shell/key-bindings.fish" \
+ "$pkgdir/usr/share/fish/functions/fzf.fish"
+
+ msg2 'Installing zsh completion and keybindings...'
+ install -Dm 644 "shell/completion.zsh" \
+ "$pkgdir/usr/share/zsh/site-functions/_fzf"
+ install -Dm 755 "shell/key-bindings.zsh" "$pkgdir/etc/profile.d/fzf.zsh"
+
+ msg2 'Cleaning up pkgdir...'
+ find "$pkgdir" -type d -name .git -exec rm -r '{}' +
+}
diff --git a/fzf.install b/fzf.install
new file mode 100644
index 000000000000..86b5c6b7ca2b
--- /dev/null
+++ b/fzf.install
@@ -0,0 +1,26 @@
+post_install() {
+ printf "%b\n" "$fzfin"
+}
+
+read -d '' fzfin <<'EOF'
+fzf
+===
+
+Optional fzf keybindings for bash have been placed here:
+
+ /etc/profile.d/fzf.bash
+
+To utilize, add the following to your bash config:
+
+ . /etc/profile.d/fzf.bash
+
+Or for zsh, add the following to your config:
+
+ . /etc/profile.d/fzf.zsh
+
+For fish, keybindings are in
+
+ /usr/share/fish/functions/fzf.fish
+
+Fish will source this by default.
+EOF
diff --git a/key-bindings.bash.patch b/key-bindings.bash.patch
new file mode 100644
index 000000000000..300d2b0afee8
--- /dev/null
+++ b/key-bindings.bash.patch
@@ -0,0 +1,11 @@
+--- ./shell/key-bindings.bash 2015-10-05 07:52:39.421599247 -0700
++++ ./shell/key-bindings.bash 2015-10-05 07:52:57.124933562 -0700
+@@ -1,3 +1,8 @@
++# Auto-completion
++# ---------------
++[[ $- =~ i && -f /usr/share/bash-completion/completions/fzf ]] \
++ && source /usr/share/bash-completion/completions/fzf
++
+ # Key bindings
+ # ------------
+ __fzf_select__() {
diff --git a/key-bindings.zsh.patch b/key-bindings.zsh.patch
new file mode 100644
index 000000000000..a47744385aaa
--- /dev/null
+++ b/key-bindings.zsh.patch
@@ -0,0 +1,12 @@
+--- ./shell/key-bindings.zsh 2015-10-05 07:53:13.168267783 -0700
++++ ./shell/key-bindings.zsh 2015-10-05 07:53:32.584935525 -0700
+@@ -1,3 +1,9 @@
++# Auto-completion
++# ---------------
++if [[ -f /usr/share/zsh/site-functions/_fzf ]]; then
++ source /usr/share/zsh/site-functions/_fzf
++fi
++
+ # Key bindings
+ # ------------
+ if [[ $- == *i* ]]; then