From a43289a446580c51810d49190059013247ed4535 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 5 Feb 2021 00:33:20 +0000 Subject: [PATCH] added community/fzf --- community/fzf/PKGBUILD | 82 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 community/fzf/PKGBUILD diff --git a/community/fzf/PKGBUILD b/community/fzf/PKGBUILD new file mode 100644 index 000000000..c085f1da5 --- /dev/null +++ b/community/fzf/PKGBUILD @@ -0,0 +1,82 @@ +# Maintainer: Thore Bödecker +# Maintainer: Morten Linderud +# Maintainer: Filipe Laíns (FFY00) +# Contributor: Pierre Neidhardt +# Contributor: Hermann Zahnweh (eigengrau) +# Contributor: Andy Weidenbaum +# Contributor: foalsrock +# Contributor: jebaum + +# ALARM: Kevin Mihelich +# - generalize arch-dependent install line + +buildarch=28 + +pkgname=fzf +pkgver=0.25.1 +pkgrel=1 +pkgdesc='Command-line fuzzy finder' +arch=('x86_64') +url='https://github.com/junegunn/fzf' +license=('MIT') +depends=('bash') +makedepends=('git' 'go') +optdepends=('fish: fish keybindings' + 'tmux: fzf-tmux script for launching fzf in a tmux pane' + 'vim: plugin' + 'zsh: zsh keybindings') +source=("git+https://github.com/junegunn/fzf.git#tag=${pkgver}?signed") +validpgpkeys=('B5FB4AB5F32EC1A0C9DE9637254BC280FEF9C627') +sha512sums=('SKIP') + +prepare() { + cd "${pkgname}" + sed -i 's/-w /-w -linkmode external /' Makefile +} + +build() { + cd "${pkgname}" + 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 +} + +check() { + cd "${pkgname}" + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + go test ./... +} + +package() { + cd "${pkgname}" + + ## Man page + install -Dm644 man/man1/fzf.1 "$pkgdir"/usr/share/man/man1/fzf.1 + + ## License + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/fzf/LICENSE + + ## Binaries + install -dm755 "$pkgdir"/usr/bin + install -m755 bin/fzf-tmux "$pkgdir"/usr/bin/ + install -Dm755 target/fzf-linux_* "$pkgdir"/usr/bin/fzf + + ## Completion and keybindings + install -dm755 "$pkgdir"/usr/share/fzf + install -m644 shell/*.bash shell/*.zsh "$pkgdir"/usr/share/fzf + + ## Fish keybindings + install -Dm644 shell/key-bindings.fish "$pkgdir"/usr/share/fish/vendor_functions.d/fzf_key_bindings.fish + + ## Vim plugin + install -Dm644 doc/fzf.txt "$pkgdir"/usr/share/vim/vimfiles/doc/fzf.txt + install -Dm644 plugin/fzf.vim "$pkgdir"/usr/share/vim/vimfiles/plugin/fzf.vim +} +