# Build project from bundled dependencies %global with_bundled 0 # Build with debug info rpm %global with_debug 0 %if 0%{?with_debug} %global _dwz_low_mem_die_limit 0 %else %global debug_package %{nil} %endif %global provider github %global provider_tld com %global project junegunn %global repo fzf # https://github.com/junegunn/fzf %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} %global commitdate 20181006 %global realver 0.21.1 Name: fzf Version: 0.21.1 Release: 1%{?dist} Summary: A command-line fuzzy finder written in Go License: MIT URL: https://%{provider_prefix} Source0: https://%{provider_prefix}/archive/%{realver}/%{repo}-%{realver}.tar.gz Source1: README.Fedora # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} BuildRequires: git #BuildRequires: golang(github.com/gdamore/tcell) #BuildRequires: golang(github.com/gdamore/tcell/encoding) #BuildRequires: golang(github.com/mattn/go-isatty) #BuildRequires: golang(github.com/mattn/go-runewidth) #BuildRequires: golang(github.com/mattn/go-shellwords) #BuildRequires: golang(golang.org/x/crypto/ssh/terminal) %description fzf is a general-purpose command-line fuzzy finder. It's an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc. %prep %setup -q -n %{repo}-%{realver} cp %{SOURCE1} . %build mkdir -p src/%{provider}.%{provider_tld}/%{project}/ ln -s $(pwd) src/%{provider}.%{provider_tld}/%{project}/%{repo} mkdir gopath export GOPATH=$(pwd)/gopath export GO111MODULE=on go mod vendor go build --mod=vendor -o bin/fzf %{import_path} go clean -modcache rm -fr "${GOPATH}" # Cleanup interpreters sed -i -e '/^#!\//, 1d' shell/completion.* sed -i -e '1d;2i#!/bin/bash' bin/fzf-tmux %install install -d -p %{buildroot}%{_bindir} install -Dpm0755 bin/fzf %{buildroot}%{_bindir}/ install -Dpm0755 bin/fzf-tmux %{buildroot}%{_bindir}/ install -d -p %{buildroot}%{_mandir}/man1 install -Dpm0644 man/man1/*.1 %{buildroot}%{_mandir}/man1/ install -d %{buildroot}%{_datadir}/fzf # Install vim plugin install -d %{buildroot}%{_datadir}/vim/vimfiles/plugin install -Dpm0644 plugin/fzf.vim %{buildroot}%{_datadir}/vim/vimfiles/plugin/ install -d %{buildroot}%{_datadir}/nvim/site/plugin install -Dpm0644 plugin/fzf.vim %{buildroot}%{_datadir}/nvim/site/plugin/ # Install shell completion install -d %{buildroot}%{_sysconfdir}/bash_completion.d install -Dpm0644 shell/completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/fzf install -d %{buildroot}%{_datadir}/zsh/site-functions install -Dpm0644 shell/completion.zsh %{buildroot}%{_datadir}/zsh/site-functions/fzf # Install shell key bindings (not enabled) install -d %{buildroot}%{_datadir}/fzf/shell install -Dpm0644 shell/key-bindings.* %{buildroot}%{_datadir}/fzf/shell/ #define license tag if not already defined %{!?_licensedir:%global license %doc} %files %license LICENSE %doc README.md README-VIM.md CHANGELOG.md README.Fedora %{_bindir}/fzf %{_bindir}/fzf-tmux %{_mandir}/man1/fzf.1* %{_mandir}/man1/fzf-tmux.1* %dir %{_datadir}/fzf %{_datadir}/fzf/shell %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/fzf %dir %{_datadir}/vim/vimfiles/plugin %{_datadir}/vim/vimfiles/plugin/fzf.vim %dir %{_datadir}/nvim/site/plugin %{_datadir}/nvim/site/plugin/fzf.vim %{_sysconfdir}/bash_completion.d/fzf %changelog * Wed Oct 10 2018 Elliott Sales de Andrade - 0.17.5-1 - New upstream release. * Thu Jun 14 2018 Elliott Sales de Andrade - 0.17.4-1 - New upstream release. * Fri Mar 16 2018 Elliott Sales de Andrade 0.17.3-1 - New upstream release. * Wed Feb 07 2018 Fedora Release Engineering - 0.17.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sun Oct 22 2017 Elliott Sales de Andrade 0.17.1-1 - New upstream release. * Wed Sep 20 2017 Elliott Sales de Andrade 0.17.0.2-1 - New upstream release. * Mon Sep 4 2017 Elliott Sales de Andrade 0.17.0-1 - New upstream release. - Mention neovim in readme as well. * Mon Sep 4 2017 Elliott Sales de Andrade 0.16.11-7 - Install plugin for neovim also. * Thu Aug 24 2017 Elliott Sales de Andrade 0.16.11-6 - Turn off source and unit testing packages. * Wed Aug 23 2017 Elliott Sales de Andrade 0.16.11-5 - Enable vim plugin by default. - Fix directory ownership on plugins. * Mon Aug 21 2017 Elliott Sales de Andrade 0.16.11-4 - Restore dist tag. * Sun Aug 20 2017 Elliott Sales de Andrade 0.16.11-3 - Fix source URL. - Enable debuginfo subpackage. - Correct interpreters in shebangs. * Sun Aug 20 2017 Elliott Sales de Andrade 0.16.11-2 - Add fzf binary to package. - Add Fedora-specific readme about optional things. - Install shell completions. - Install (disabled) vim plugin also. - Install (disabled) shell key bindings. * Fri Aug 18 2017 Elliott Sales de Andrade 0.16.11-1 - Initial package for Fedora