# # Maintainer: Kei Tachikawa # Contributor: Only_vip pkgname=fzf-git _pkgname=fzf pkgver=0.27.2.2.g7191ebb pkgrel=1 epoch=1 pkgdesc="Command-line fuzzy finder" arch=('aarch64' 'armv6h' 'armv7h' 'armv5h' 'x86_64') depends=('libncurses-dev') makedepends=('git' 'golang-go' 'make' 'build-essential' 'pkg-config' 'golang-src') optdepends=('fish: fish keybindings' 'fzf-extras: fzf keybindings from junegunn wiki and dotfiles' 'tmux: fzf-tmux script for launching fzf in a tmux pane' 'zsh: zsh keybindings') url="https://github.com/junegunn/fzf" license=('MIT') source=("git://github.com/junegunn/fzf.git") sha256sums=("SKIP") provides=('fzf') conflicts=('fzf') post_install=${srcdir}/fzf/install pkgver() { cd "${srcdir}/${_pkgname}" git describe --tags | sed "s:-:.:g" } build() { cd "${srcdir}/${_pkgname}" msg2 'Building...' go build -o fzf . } package() { #cd ${_pkgname} msg2 'Installing documentation...' mkdir -p ${pkgdir}/usr/share/doc cp -r ${srcdir}/fzf/doc/* "${pkgdir}"/usr/share/doc #install -Dm 644 ${srcdir}/${_pkgname}/doc/${_pkgname}.txt -t "${pkgdir}"/usr/share/doc/fzf #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 ${srcdir}/fzf/man/man1/fzf.1 -t "${pkgdir}"/usr/share/man/man1 install -Dm 644 ${srcdir}/fzf/man/man1/fzf-tmux.1 -t "${pkgdir}"/usr/share/man/man1 msg2 'Installing executables...' install -Dm 755 ${srcdir}/fzf/fzf -t "${pkgdir}"/usr/bin install -Dm 755 ${srcdir}/fzf/bin/fzf-tmux -t "${pkgdir}"/usr/bin msg2 'Installing bash completion and keybindings...' install -Dm 644 ${srcdir}/fzf/shell/completion.bash \ "${pkgdir}"/usr/share/bash-completion/completions/fzf install -Dm 755 ${srcdir}/fzf/shell/key-bindings.bash "${pkgdir}"/etc/profile.d/fzf.bash msg2 'Installing fish keybindings...' install -Dm 644 ${srcdir}/fzf/shell/key-bindings.fish \ "${pkgdir}"/usr/share/fish/functions/fzf.fish msg2 'Installing vimfiles...' install -Dm 644 ${srcdir}/fzf/plugin/fzf.vim \ "${pkgdir}"/usr/share/vim/vimfiles/plugin/fzf.vim msg2 'Installing zsh completion and keybindings...' install -Dm 644 ${srcdir}/fzf/shell/completion.zsh \ "${pkgdir}"/usr/share/zsh/site-functions/_fzf install -Dm 755 ${srcdir}/fzf/shell/key-bindings.zsh "${pkgdir}"/etc/profile.d/fzf.zsh }