forked from neovim/neovim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
neovim.spec.rpkg
297 lines (237 loc) · 9.59 KB
/
neovim.spec.rpkg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# vim:ft=spec:
%if 0%{?el8}
# see https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds
# EPEL 8's %%cmake defaults to in-source build, which neovim does not support
%undefine __cmake_in_source_build
%endif
%bcond_with jemalloc
%ifarch %{arm} %{ix86} x86_64 %{mips} s390x
%bcond_without luajit
%else
%ifarch aarch64
%if 0%{?el8}
# luajit codepath buggy on el8 aarch64
# https://bugzilla.redhat.com/show_bug.cgi?id=2065340
%bcond_with luajit
%else
%bcond_without luajit
%endif
%else
%bcond_with luajit
%endif
%endif
%global luv_min_ver 1.43.0
%global tree_sitter_min_ver 0.22.5
%global vterm_min_ver 0.3.3
%global luv_include_dir %{_includedir}/luv
%if %{with luajit}
%global luajit_version 2.1
%global lua_prg %{_bindir}/luajit
%else
%global lua_version 5.1
%global lua_prg %{_bindir}/lua-5.1
%endif
Name: {{{git_name name="neovim"}}}
Version: {{{git_version}}}
Release: {{{git_revision}}}%{?dist}
License: Apache-2.0 AND Vim
Summary: Vim-fork focused on extensibility and agility
Url: https://neovim.io
Source0: {{{git_repo_pack}}}
Source1: sysinit.vim
Source2: spec-template
Patch1000: neovim-lua-bit32.patch
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: gettext
BuildRequires: gperf
BuildRequires: gcc
Requires: utf8proc
BuildRequires: utf8proc-devel
BuildRequires: libluv-devel >= %{luv_min_ver}
%if %{with luajit}
# luajit implements version 5.1 of the lua language spec, so it needs the
# compat versions of libs.
BuildRequires: luajit-devel
Requires: luajit2.1-luv >= %{luv_min_ver}
%else
# lua5.1
BuildRequires: compat-lua
BuildRequires: compat-lua-devel
BuildRequires: lua5.1-bit32
Requires: lua5.1-luv >= %{luv_min_ver}
# /with luajit
%endif
Requires: lua5.1-lpeg
BuildRequires: lua5.1-lpeg
BuildRequires: lua5.1-mpack >= 1.0.11
%if %{with jemalloc}
BuildRequires: jemalloc-devel
%endif
BuildRequires: msgpack-devel >= 3.1.0
BuildRequires: pkgconfig(termkey)
BuildRequires: pkgconfig(libuv) >= 1.42.0
BuildRequires: pkgconfig(vterm) >= %{vterm_min_ver}
# need the build with the fix for the resize buffer issue
Requires: libvterm >= %{vterm_min_ver}
BuildRequires: pkgconfig(unibilium)
BuildRequires: pkgconfig(tree-sitter) >= %{tree_sitter_min_ver}
# tree-sitter didn't do an soname bump. enforce the min version
# see https://github.com/nvim-treesitter/nvim-treesitter/pull/3055/files
Requires: libtree-sitter >= %{tree_sitter_min_ver}
# Parser generator, only needed for :TSInstallFromGrammar
Recommends: tree-sitter-cli
Suggests: (python2-neovim if python2)
Suggests: (python3-neovim if python3)
# XSel provides access to the system clipboard
Recommends: xsel
Recommends: wl-clipboard
Recommends: ripgrep
%description
Neovim is a refactor - and sometimes redactor - in the tradition of
Vim, which itself derives from Stevie. It is not a rewrite, but a
continuation and extension of Vim. Many rewrites, clones, emulators
and imitators exist; some are very clever, but none are Vim. Neovim
strives to be a superset of Vim, notwithstanding some intentionally
removed misfeatures; excepting those few and carefully-considered
excisions, Neovim is Vim. It is built for users who want the good
parts of Vim, without compromise, and more.
%prep
{{{git_setup_macro path="$GIT_ROOT"}}}
rm -rf .deps
cp -as $PWD/vendor .deps
%if %{without luajit}
%patch -P 1000 -p1
%endif
%build
# set vars to make build reproducible; see config/CMakeLists.txt
HOSTNAME=koji
USERNAME=koji
# Build the tree-sitter parsers first
%define _vpath_srcdir cmake.deps
%define __cmake_builddir .deps
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DUSE_BUNDLED=OFF \
-DUSE_BUNDLED_TS_PARSERS=ON
%cmake_build
# Build neovim
%define _vpath_srcdir .
%define __cmake_builddir redhat-linux-build
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPREFER_LUA=%{?with_luajit:OFF}%{!?with_luajit:ON} \
-DLUA_PRG=%{lua_prg} \
-DENABLE_JEMALLOC=%{?with_jemalloc:ON}%{!?with_jemalloc:OFF} \
-DLIBLUV_INCLUDE_DIR:PATH=%{luv_include_dir} \
-DNVIM_VERSION_MEDIUM="{{{neovim_dev_version}}}"
%cmake_build
%install
%cmake_install
install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/nvim/sysinit.vim
install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/nvim/template.spec
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
runtime/nvim.desktop
install -d -m0755 %{buildroot}%{_datadir}/pixmaps
install -m0644 runtime/nvim.png %{buildroot}%{_datadir}/pixmaps/nvim.png
%fdupes %{buildroot}%{_datadir}/
# Fix exec bits
find %{buildroot}%{_datadir} \( -name "*.bat" -o -name "*.awk" \) \
-print -exec chmod -x '{}' \;
%find_lang nvim
# Refresh documentation helptags.
%transfiletriggerin -- %{_datadir}/nvim/runtime/doc
%{_bindir}/nvim -u NONE -es -c ":helptags %{_datadir}/nvim/runtime/doc" -c ":q" &> /dev/null || :
%transfiletriggerpostun -- %{_datadir}/nvim/runtime/doc
> %{_datadir}/nvim/runtime/doc/tags || :
%{_bindir}/nvim -u NONE -es -c ":helptags %{_datadir}/nvim/runtime/doc" -c ":q" &> /dev/null || :
%files -f nvim.lang
%license LICENSE.txt
%doc CONTRIBUTING.md MAINTAIN.md README.md
%{_bindir}/nvim
%dir %{_libdir}/nvim
%dir %{_libdir}/nvim/parser
%{_libdir}/nvim/parser/*.so
%{_mandir}/man1/nvim.1*
%{_datadir}/applications/nvim.desktop
%{_datadir}/pixmaps/nvim.png
%{_datadir}/icons/hicolor/128x128/apps/nvim.png
%{_datadir}/nvim
%changelog
* {{{git_changelog_date}}} Aron Griffis <[email protected]> - {{{git_changelog_version}}}
- Nightly build from git master
* Tue Jul 02 2024 Andreas Schneider <[email protected]> - 0.10.0-6
- resolves: rhbz#2283574 - Bundle required tree-sitter parsers
* Fri May 24 2024 Andreas Schneider <[email protected]> - 0.10.0-5
- Fix updating helptags
* Wed May 22 2024 Danie de Jager <[email protected]> - 0.10.0-4
- Add missing lua5.1-lpeg runtime requirement
* Tue May 21 2024 Andreas Schneider <[email protected]> - 0.10.0-3
- Add RPM file triggers support to regenerate helptags
* Thu May 16 2024 Andreas Schneider <[email protected]> - 0.10.0-2
- Update neovim-lua-bit32.patch
* Thu May 16 2024 Andreas Schneider <[email protected]> - 0.10.0-1
- Update to version 0.10.0 - check `:help news` for important changes
* Mon Mar 04 2024 Andreas Schneider <[email protected]> - 0.9.5-4
- resolves: #2222911 - Build with luajit on s390x
* Thu Jan 25 2024 Fedora Release Engineering <[email protected]> - 0.9.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <[email protected]> - 0.9.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Jan 02 2024 Andreas Schneider <[email protected]> - 0.9.5-1
- Update to version 0.9.5
* https://github.com/neovim/neovim/releases/tag/v0.9.5
* For bigger version bump changelog see `:help news`
* resolves: rhbz#2256278
* Fri Oct 20 2023 Andreas Schneider <[email protected]> - 0.9.4-1
- Update to version 0.9.4
* https://github.com/neovim/neovim/releases/tag/v0.9.4
* For bigger version bump changelog see `:help news`
* resolves: rhbz#2243010
* Thu Sep 07 2023 Andreas Schneider <[email protected]> - 0.9.2-1
- Update to version 0.9.2
* For changelog see `:help news`
* Mon Aug 28 2023 LuK1337 <[email protected]> - 0.9.1-4
- Improve spec template
* Thu Jul 20 2023 Fedora Release Engineering <[email protected]> - 0.9.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 06 2023 Andreas Schneider <[email protected]> - 0.9.1-2
- Build with new libluv-devel
* Wed May 31 2023 Andreas Schneider <[email protected]> - 0.9.1-1
- Update to version 0.9.1
* For changelog see `:help news`
* Tue May 02 2023 Andreas Schneider <[email protected]> - 0.9.0-3
- Improve semantic token performance
- related: rhbz#2188229 - Fix applying patches
* Fri Apr 21 2023 Andreas Schneider <[email protected]> - 0.9.0-2
- resolves: rhbz#2188229 - Fix buffer overflow for user command
* Fri Apr 07 2023 Andreas Schneider <[email protected]> - 0.9.0-1
- Update to version 0.9.0
* For changelog see `:help news`
* Mon Mar 27 2023 Andreas Schneider <[email protected]> - 0.8.3-4
- resolves: rhbz#2181836 - Fix snprintf buffer overflow with tags
* Sat Mar 25 2023 Andreas Schneider <[email protected]> - 0.8.3-3
- resolves: rhbz#2165805 - Fix snprintf buffer overflow
* Sun Mar 05 2023 Andreas Schneider <[email protected]> - 0.8.3-2
- Update License to SPDX expression
- Update spec template for auto(release|changelog)
* Thu Feb 02 2023 Andreas Schneider <[email protected]> - 0.8.3-1
- Update to version 0.8.3
* https://github.com/neovim/neovim/releases/tag/v0.8.3
* Thu Jan 19 2023 Fedora Release Engineering <[email protected]> - 0.8.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 30 2022 Andreas Schneider <[email protected]> - 0.8.2-1
- Update to version 0.8.2
* https://github.com/neovim/neovim/releases/tag/v0.8.2
* Mon Nov 14 2022 Andreas Schneider <[email protected]> - 0.8.1-1
- Update to version 0.8.1
* https://github.com/neovim/neovim/releases/tag/v0.8.1
* Fri Sep 30 2022 Andreas Schneider <[email protected]> - 0.8.0-1
- Update to version 0.8.0
* https://github.com/neovim/neovim/releases/tag/v0.8.0
* Wed Sep 21 2022 Andreas Schneider <[email protected]> - 0.7.2-4
- Build with libvterm 0.3
* Thu Aug 25 2022 Michel Alexandre Salim <[email protected]> - 0.7.2-3
- Enforce the minimum tree-sitter version at runtime (Fixes: rhbz#2100577)
* Fri Jul 22 2022 Fedora Release Engineering <[email protected]> - 0.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild