diff options
author | davidovski <david@davidovski.xyz> | 2022-05-31 11:05:19 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-05-31 11:05:19 +0100 |
commit | 48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch) | |
tree | 00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/fzf/fzf.xibuild | |
parent | 871b2b573f01c1b3176a0f65458b3d281b41c437 (diff) |
removed idea of repos
Diffstat (limited to 'repo/fzf/fzf.xibuild')
-rw-r--r-- | repo/fzf/fzf.xibuild | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/repo/fzf/fzf.xibuild b/repo/fzf/fzf.xibuild new file mode 100644 index 0000000..6926f2f --- /dev/null +++ b/repo/fzf/fzf.xibuild @@ -0,0 +1,52 @@ +#!/bin/sh + +MAKEDEPS="git go" +DEPS="sh" + +PKG_VER=0.29.0 +SOURCE=https://github.com/junegunn/fzf.git +BRANCH=$PKG_VER +DESC="Command-line fuzzy finder" + +prepare () { + sed -i 's/-w /-w -linkmode external /' Makefile + sed -i '61s,.*, defaultCommand = `command find -L . -mindepth 1 -path "*/\.*" -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-`,' src/constants.go +} + +build () { + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + make + +} + +package () { + ## Man page + install -Dm644 man/man1/fzf.1 "$PKG_DEST"/usr/share/man/man1/fzf.1 + install -Dm644 man/man1/fzf-tmux.1 "$PKG_DEST"/usr/share/man/man1/fzf-tmux.1 + + ## License + install -Dm644 LICENSE "$PKG_DEST"/usr/share/licenses/fzf/LICENSE + + ## Binaries + install -dm755 "$PKG_DEST"/usr/bin + install -m755 bin/fzf-tmux "$PKG_DEST"/usr/bin/ + install -Dm755 target/fzf-linux_amd64 "$PKG_DEST"/usr/bin/fzf + + ## Completion and keybindings + install -dm755 "$PKG_DEST"/usr/share/fzf + install -m644 shell/*.bash shell/*.zsh "$PKG_DEST"/usr/share/fzf + + ## Fish keybindings + install -Dm644 shell/key-bindings.fish "$PKG_DEST"/usr/share/fish/vendor_functions.d/fzf_key_bindings.fish + + ## Vim plugin + install -Dm644 doc/fzf.txt "$PKG_DEST"/usr/share/vim/vimfiles/doc/fzf.txt + install -Dm644 plugin/fzf.vim "$PKG_DEST"/usr/share/vim/vimfiles/plugin/fzf.vim + +} + + |