]>
Commit | Line | Data |
---|---|---|
855f089b JP |
1 | # TODO: |
2 | # - package vendored modules | |
3 | # - package fzf-tmux | |
4 | Summary: A command-line fuzzy finder written in Go | |
5 | Name: fzf | |
6 | Version: 0.21.1 | |
7 | Release: 1 | |
8 | License: MIT | |
9 | Group: Applications/Shells | |
10 | #Source0Download: https://github.com/junegunn/fzf/releases | |
f5228bc4 | 11 | Source0: https://github.com/junegunn/fzf/archive/%{version}/%{name}-%{version}.tar.gz |
855f089b JP |
12 | # Source0-md5: 6c27760987032a0cf847caf61f8e7722 |
13 | # cd fzf-%{version} | |
14 | # go mod vendor | |
15 | # cd .. | |
16 | # tar cJf fzf-vendor-%{version}.tar.xz fzf-%{version}/vendor | |
17 | Source1: %{name}-vendor-%{version}.tar.xz | |
18 | # Source1-md5: 9ac6ea822f43566753e072fba53b510c | |
19 | URL: https://github.com/junegunn/fzf | |
20 | BuildRequires: golang >= 1.13 | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | fzf is a general-purpose command-line fuzzy finder. | |
25 | ||
26 | It's an interactive Unix filter for command-line that can be used with | |
27 | any list; files, command history, processes, hostnames, bookmarks, git | |
28 | commits, etc. | |
29 | ||
30 | %package -n bash-completion-fzf | |
31 | Summary: bash-completion for fzf | |
32 | Group: Applications/Shells | |
33 | Requires: %{name} = %{version}-%{release} | |
34 | Requires: bash-completion >= 2.0 | |
35 | %if "%{_rpmversion}" >= "4.6" | |
36 | BuildArch: noarch | |
37 | %endif | |
38 | ||
39 | %description -n bash-completion-fzf | |
40 | bash-completion for fzf. | |
41 | ||
42 | %package -n zsh-completion-fzf | |
43 | Summary: zsh-completion for fzf | |
44 | Group: Applications/Shells | |
45 | Requires: %{name} = %{version}-%{release} | |
46 | Requires: zsh | |
47 | %if "%{_rpmversion}" >= "4.6" | |
48 | BuildArch: noarch | |
49 | %endif | |
50 | ||
51 | %description -n zsh-completion-fzf | |
52 | zsh-completion for fzf. | |
53 | ||
54 | %package -n vim-plugin-fzf | |
55 | Summary: fzf integration for Vim | |
56 | Group: Applications/Editors/Vim | |
57 | Requires: %{name} = %{version}-%{release} | |
58 | Requires: vim-rt | |
59 | %if "%{_rpmversion}" >= "4.6" | |
60 | BuildArch: noarch | |
61 | %endif | |
62 | ||
63 | %description -n vim-plugin-fzf | |
64 | fzf integration for Vim. | |
65 | ||
66 | %package -n vim-plugin-fzf-doc | |
67 | Summary: Documentation for fzf Vim plugin | |
68 | Group: Applications/Editors/Vim | |
69 | Requires: vim-plugin-fzf = %{version}-%{release} | |
70 | Requires: vim-rt | |
71 | %if "%{_rpmversion}" >= "4.6" | |
72 | BuildArch: noarch | |
73 | %endif | |
74 | ||
75 | %description -n vim-plugin-fzf-doc | |
76 | Documentation for fzf Vim plugin. | |
77 | ||
78 | %prep | |
79 | %setup -q -b1 | |
80 | ||
81 | %build | |
92db8766 | 82 | %{__make} GOFLAGS=-mod=vendor |
855f089b JP |
83 | |
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/fzf,%{_mandir}/man1,%{bash_compdir},%{zsh_compdir}} | |
88 | install -d $RPM_BUILD_ROOT%{_datadir}/vim/{doc,vimfiles/plugin} | |
89 | ||
90 | cp -p target/fzf-linux* $RPM_BUILD_ROOT%{_bindir}/fzf | |
91 | cp -p man/man1/fzf.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
92 | cp -p shell/completion.bash $RPM_BUILD_ROOT%{bash_compdir}/fzf | |
93 | cp -p shell/key-bindings.bash $RPM_BUILD_ROOT%{_datadir}/fzf | |
94 | cp -p shell/completion.zsh $RPM_BUILD_ROOT%{zsh_compdir}/_fzf | |
95 | cp -p shell/key-bindings.zsh $RPM_BUILD_ROOT%{_datadir}/fzf | |
96 | cp -p plugin/fzf.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/plugin/fzf.vim | |
97 | cp -p doc/fzf.txt $RPM_BUILD_ROOT%{_datadir}/vim/doc/fzf.txt | |
98 | ||
99 | %clean | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %post -n vim-plugin-fzf-doc | |
103 | %vim_doc_helptags | |
104 | ||
105 | %postun -n vim-plugin-fzf-doc | |
106 | %vim_doc_helptags | |
107 | ||
108 | %files | |
109 | %defattr(644,root,root,755) | |
110 | %doc BUILD.md CHANGELOG.md README.md | |
111 | %attr(755,root,root) %{_bindir}/fzf | |
112 | %dir %{_datadir}/fzf | |
113 | %{_mandir}/man1/fzf.1* | |
114 | ||
115 | %files -n bash-completion-fzf | |
116 | %defattr(644,root,root,755) | |
117 | %{bash_compdir}/fzf | |
118 | %{_datadir}/fzf/key-bindings.bash | |
119 | ||
120 | %files -n zsh-completion-fzf | |
121 | %defattr(644,root,root,755) | |
122 | %{zsh_compdir}/_fzf | |
123 | %{_datadir}/fzf/key-bindings.zsh | |
124 | ||
125 | %files -n vim-plugin-fzf | |
126 | %defattr(644,root,root,755) | |
127 | %doc README-VIM.md | |
128 | %defattr(644,root,root,755) | |
129 | %{_datadir}/vim/vimfiles/plugin | |
130 | ||
131 | %files -n vim-plugin-fzf-doc | |
132 | %defattr(644,root,root,755) | |
133 | %{_datadir}/vim/doc/fzf.txt |