2 # - package vendored modules
7 Summary: A command-line fuzzy finder written in Go
12 Group: Applications/Shells
13 #Source0Download: https://github.com/junegunn/fzf/releases
14 Source0: https://github.com/junegunn/fzf/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 30777ada501f8e63a0446661a9c13552
19 # tar cJf fzf-vendor-%{version}.tar.xz fzf-%{version}/vendor
20 Source1: %{name}-vendor-%{version}.tar.xz
21 # Source1-md5: bb02d220d19826af17272dd46b5c787d
22 URL: https://github.com/junegunn/fzf
23 BuildRequires: golang >= 1.13
24 ExclusiveArch: %{x8664} armv5l armv6l armv7l armv8l aarch64 ppc64le
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 fzf is a general-purpose command-line fuzzy finder.
30 It's an interactive Unix filter for command-line that can be used with
31 any list; files, command history, processes, hostnames, bookmarks, git
34 %package -n bash-completion-fzf
35 Summary: bash-completion for fzf
36 Group: Applications/Shells
37 Requires: %{name} = %{version}-%{release}
38 Requires: bash-completion >= 2.0
39 %if "%{_rpmversion}" >= "4.6"
43 %description -n bash-completion-fzf
44 bash-completion for fzf.
46 %package -n zsh-completion-fzf
47 Summary: zsh-completion for fzf
48 Group: Applications/Shells
49 Requires: %{name} = %{version}-%{release}
51 %if "%{_rpmversion}" >= "4.6"
55 %description -n zsh-completion-fzf
56 zsh-completion for fzf.
58 %package -n vim-plugin-fzf
59 Summary: fzf integration for Vim
60 Group: Applications/Editors/Vim
61 Requires: %{name} = %{version}-%{release}
63 %if "%{_rpmversion}" >= "4.6"
67 %description -n vim-plugin-fzf
68 fzf integration for Vim.
70 %package -n vim-plugin-fzf-doc
71 Summary: Documentation for fzf Vim plugin
72 Group: Applications/Editors/Vim
73 Requires: vim-plugin-fzf = %{version}-%{release}
75 %if "%{_rpmversion}" >= "4.6"
79 %description -n vim-plugin-fzf-doc
80 Documentation for fzf Vim plugin.
86 %{__make} FZF_VERSION=%{version} FZF_REVISION=%{fzfrev} GOFLAGS=-mod=vendor
89 rm -rf $RPM_BUILD_ROOT
91 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/fzf,%{_mandir}/man1,%{bash_compdir},%{zsh_compdir}}
92 install -d $RPM_BUILD_ROOT%{_datadir}/vim/{doc,vimfiles/plugin}
94 cp -p target/fzf-linux* $RPM_BUILD_ROOT%{_bindir}/fzf
95 cp -p man/man1/fzf.1 $RPM_BUILD_ROOT%{_mandir}/man1
96 cp -p shell/completion.bash $RPM_BUILD_ROOT%{_datadir}/fzf
97 cp -p shell/key-bindings.bash $RPM_BUILD_ROOT%{_datadir}/fzf
98 cp -p shell/completion.zsh $RPM_BUILD_ROOT%{_datadir}/fzf
99 cp -p shell/key-bindings.zsh $RPM_BUILD_ROOT%{_datadir}/fzf
100 cp -p plugin/fzf.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/plugin/fzf.vim
101 cp -p doc/fzf.txt $RPM_BUILD_ROOT%{_datadir}/vim/doc/fzf.txt
104 rm -rf $RPM_BUILD_ROOT
106 %post -n vim-plugin-fzf-doc
109 %postun -n vim-plugin-fzf-doc
113 %defattr(644,root,root,755)
114 %doc BUILD.md CHANGELOG.md README.md
115 %attr(755,root,root) %{_bindir}/fzf
117 %{_mandir}/man1/fzf.1*
119 %files -n bash-completion-fzf
120 %defattr(644,root,root,755)
121 %{_datadir}/fzf/completion.bash
122 %{_datadir}/fzf/key-bindings.bash
124 %files -n zsh-completion-fzf
125 %defattr(644,root,root,755)
126 %{_datadir}/fzf/completion.zsh
127 %{_datadir}/fzf/key-bindings.zsh
129 %files -n vim-plugin-fzf
130 %defattr(644,root,root,755)
132 %defattr(644,root,root,755)
133 %{_datadir}/vim/vimfiles/plugin
135 %files -n vim-plugin-fzf-doc
136 %defattr(644,root,root,755)
137 %{_datadir}/vim/doc/fzf.txt