]> git.pld-linux.org Git - packages/fzf.git/blob - fzf.spec
typo
[packages/fzf.git] / fzf.spec
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.23.0
7 Release:        2
8 License:        MIT
9 Group:          Applications/Shells
10 #Source0Download: https://github.com/junegunn/fzf/releases
11 Source0:        https://github.com/junegunn/fzf/archive/%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5:  7a1b0cc556936cb21fc15857fc244c6c
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:  897dd533480396c8e70459f96474b5a9
19 URL:            https://github.com/junegunn/fzf
20 BuildRequires:  golang >= 1.13
21 ExclusiveArch:  %{x8664} armv5l armv6l armv7l armv8l aarch64 ppc64le
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 fzf is a general-purpose command-line fuzzy finder.
26
27 It's an interactive Unix filter for command-line that can be used with
28 any list; files, command history, processes, hostnames, bookmarks, git
29 commits, etc.
30
31 %package -n bash-completion-fzf
32 Summary:        bash-completion for fzf
33 Group:          Applications/Shells
34 Requires:       %{name} = %{version}-%{release}
35 Requires:       bash-completion >= 2.0
36 %if "%{_rpmversion}" >= "4.6"
37 BuildArch:      noarch
38 %endif
39
40 %description -n bash-completion-fzf
41 bash-completion for fzf.
42
43 %package -n zsh-completion-fzf
44 Summary:        zsh-completion for fzf
45 Group:          Applications/Shells
46 Requires:       %{name} = %{version}-%{release}
47 Requires:       zsh
48 %if "%{_rpmversion}" >= "4.6"
49 BuildArch:      noarch
50 %endif
51
52 %description -n zsh-completion-fzf
53 zsh-completion for fzf.
54
55 %package -n vim-plugin-fzf
56 Summary:        fzf integration for Vim
57 Group:          Applications/Editors/Vim
58 Requires:       %{name} = %{version}-%{release}
59 Requires:       vim-rt
60 %if "%{_rpmversion}" >= "4.6"
61 BuildArch:      noarch
62 %endif
63
64 %description -n vim-plugin-fzf
65 fzf integration for Vim.
66
67 %package -n vim-plugin-fzf-doc
68 Summary:        Documentation for fzf Vim plugin
69 Group:          Applications/Editors/Vim
70 Requires:       vim-plugin-fzf = %{version}-%{release}
71 Requires:       vim-rt
72 %if "%{_rpmversion}" >= "4.6"
73 BuildArch:      noarch
74 %endif
75
76 %description -n vim-plugin-fzf-doc
77 Documentation for fzf Vim plugin.
78
79 %prep
80 %setup -q -b1
81
82 %build
83 %{__make} GOFLAGS=-mod=vendor
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/fzf,%{_mandir}/man1,%{bash_compdir},%{zsh_compdir}}
89 install -d $RPM_BUILD_ROOT%{_datadir}/vim/{doc,vimfiles/plugin}
90
91 cp -p target/fzf-linux* $RPM_BUILD_ROOT%{_bindir}/fzf
92 cp -p man/man1/fzf.1 $RPM_BUILD_ROOT%{_mandir}/man1
93 cp -p shell/completion.bash $RPM_BUILD_ROOT%{_datadir}/fzf
94 cp -p shell/key-bindings.bash $RPM_BUILD_ROOT%{_datadir}/fzf
95 cp -p shell/completion.zsh $RPM_BUILD_ROOT%{_datadir}/fzf
96 cp -p shell/key-bindings.zsh $RPM_BUILD_ROOT%{_datadir}/fzf
97 cp -p plugin/fzf.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/plugin/fzf.vim
98 cp -p doc/fzf.txt $RPM_BUILD_ROOT%{_datadir}/vim/doc/fzf.txt
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post -n vim-plugin-fzf-doc
104 %vim_doc_helptags
105
106 %postun -n vim-plugin-fzf-doc
107 %vim_doc_helptags
108
109 %files
110 %defattr(644,root,root,755)
111 %doc BUILD.md CHANGELOG.md README.md
112 %attr(755,root,root) %{_bindir}/fzf
113 %dir %{_datadir}/fzf
114 %{_mandir}/man1/fzf.1*
115
116 %files -n bash-completion-fzf
117 %defattr(644,root,root,755)
118 %{_datadir}/fzf/completion.bash
119 %{_datadir}/fzf/key-bindings.bash
120
121 %files -n zsh-completion-fzf
122 %defattr(644,root,root,755)
123 %{_datadir}/fzf/completion.zsh
124 %{_datadir}/fzf/key-bindings.zsh
125
126 %files -n vim-plugin-fzf
127 %defattr(644,root,root,755)
128 %doc README-VIM.md
129 %defattr(644,root,root,755)
130 %{_datadir}/vim/vimfiles/plugin
131
132 %files -n vim-plugin-fzf-doc
133 %defattr(644,root,root,755)
134 %{_datadir}/vim/doc/fzf.txt
This page took 0.083968 seconds and 3 git commands to generate.