]> git.pld-linux.org Git - packages/fzf.git/blob - fzf.spec
up to 0.24.1
[packages/fzf.git] / fzf.spec
1 # TODO:
2 # - package vendored modules
3 # - package fzf-tmux
4
5 %define         fzfrev   d4c9db0
6
7 Summary:        A command-line fuzzy finder written in Go
8 Name:           fzf
9 Version:        0.24.1
10 Release:        1
11 License:        MIT
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
16 # cd fzf-%{version}
17 # go mod vendor
18 # cd ..
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)
26
27 %description
28 fzf is a general-purpose command-line fuzzy finder.
29
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
32 commits, etc.
33
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"
40 BuildArch:      noarch
41 %endif
42
43 %description -n bash-completion-fzf
44 bash-completion for fzf.
45
46 %package -n zsh-completion-fzf
47 Summary:        zsh-completion for fzf
48 Group:          Applications/Shells
49 Requires:       %{name} = %{version}-%{release}
50 Requires:       zsh
51 %if "%{_rpmversion}" >= "4.6"
52 BuildArch:      noarch
53 %endif
54
55 %description -n zsh-completion-fzf
56 zsh-completion for fzf.
57
58 %package -n vim-plugin-fzf
59 Summary:        fzf integration for Vim
60 Group:          Applications/Editors/Vim
61 Requires:       %{name} = %{version}-%{release}
62 Requires:       vim-rt
63 %if "%{_rpmversion}" >= "4.6"
64 BuildArch:      noarch
65 %endif
66
67 %description -n vim-plugin-fzf
68 fzf integration for Vim.
69
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}
74 Requires:       vim-rt
75 %if "%{_rpmversion}" >= "4.6"
76 BuildArch:      noarch
77 %endif
78
79 %description -n vim-plugin-fzf-doc
80 Documentation for fzf Vim plugin.
81
82 %prep
83 %setup -q -b1
84
85 %build
86 %{__make} FZF_VERSION=%{version} FZF_REVISION=%{fzfrev} GOFLAGS=-mod=vendor
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
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}
93
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
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %post -n vim-plugin-fzf-doc
107 %vim_doc_helptags
108
109 %postun -n vim-plugin-fzf-doc
110 %vim_doc_helptags
111
112 %files
113 %defattr(644,root,root,755)
114 %doc BUILD.md CHANGELOG.md README.md
115 %attr(755,root,root) %{_bindir}/fzf
116 %dir %{_datadir}/fzf
117 %{_mandir}/man1/fzf.1*
118
119 %files -n bash-completion-fzf
120 %defattr(644,root,root,755)
121 %{_datadir}/fzf/completion.bash
122 %{_datadir}/fzf/key-bindings.bash
123
124 %files -n zsh-completion-fzf
125 %defattr(644,root,root,755)
126 %{_datadir}/fzf/completion.zsh
127 %{_datadir}/fzf/key-bindings.zsh
128
129 %files -n vim-plugin-fzf
130 %defattr(644,root,root,755)
131 %doc README-VIM.md
132 %defattr(644,root,root,755)
133 %{_datadir}/vim/vimfiles/plugin
134
135 %files -n vim-plugin-fzf-doc
136 %defattr(644,root,root,755)
137 %{_datadir}/vim/doc/fzf.txt
This page took 2.163336 seconds and 3 git commands to generate.