2 # - -rt subpackage? -lang subpackage?
5 %bcond_with prefer_lua # Prefer Lua over LuaJit
7 %ifnarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 mipsel ppc
8 %define with_prefer_lua 1
11 %if %{with prefer_lua}
12 %define luv_includedir /usr/include/lua5.1
13 %define luv_library /usr/%{_lib}/lua/5.1/luv.so
15 %define luv_includedir /usr/include/luajit-2.1
16 %define luv_library /usr/%{_lib}/luajit/2.1/luv.so
19 Summary: Vim-fork focused on extensibility and agility
24 Group: Applications/Editors/Vim
25 # Source0Download: https://github.com/neovim/neovim/releases
26 Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz
27 # Source0-md5: 4fccaf03bd8854e902cabf65e85e3346
28 URL: https://neovim.io/
31 Patch1: build-type.patch
32 BuildRequires: cmake >= 3.10
33 BuildRequires: gcc >= 6:4.4
34 BuildRequires: gettext-tools
35 BuildRequires: libstdc++-devel
36 BuildRequires: libtermkey-devel >= 0.22
37 BuildRequires: libuv-devel >= 1.28.0
38 BuildRequires: libvterm-devel >= 0.3
39 BuildRequires: lua-bitop >= 1.0.2
40 BuildRequires: lua-lpeg
41 BuildRequires: lua-mpack >= 1.0.2
42 BuildRequires: msgpack-devel >= 1.1.0
43 BuildRequires: pkgconfig
44 BuildRequires: rpm-build >= 4.6
45 BuildRequires: rpmbuild(macros) >= 1.605
46 BuildRequires: tree-sitter-devel
47 BuildRequires: unibilium-devel >= 2.0.0
48 %if %{with prefer_lua}
50 BuildRequires: lua51-devel
51 BuildRequires: lua51-luv-devel >= 1.43.0
54 BuildRequires: luajit-devel
55 BuildRequires: luajit-luv-devel >= 1.43.0
57 Requires: libtermkey >= 0.22
58 Requires: libuv >= 1.28.0
59 Requires: libvterm >= 0.3
60 Requires: %{?with_prefer_lua:lua51}%{!?with_prefer_lua:luajit}-luv
61 Suggests: %{name}-desktop = %{version}-%{release}
62 Suggests: python-neovim
63 Suggests: python3-neovim
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 # gcc 4.0 and better turn on _FORTIFY_SOURCE=2 automatically. This currently
69 # does not work with Neovim due to some uses of dynamically-sized structures.
70 # See https://github.com/neovim/neovim/issues/223 for details.
71 %define filterout_c -Wp,-D_FORTIFY_SOURCE=2
74 Neovim is a refactor - and sometimes redactor - in the tradition of
75 Vim, which itself derives from Stevie. It is not a rewrite, but a
76 continuation and extension of Vim. Many rewrites, clones, emulators
77 and imitators exist; some are very clever, but none are Vim. Neovim
78 strives to be a superset of Vim, notwithstanding some intentionally
79 removed misfeatures; excepting those few and carefully-considered
80 excisions, Neovim is Vim. It is built for users who want the good
81 parts of Vim, without compromise, and more.
84 Summary: Desktop files for Neovim
85 Group: Applications/Editors/Vim
86 Requires(post,postun): desktop-file-utils
87 Requires(post,postun): gtk-update-icon-cache
88 Requires(post,postun): hicolor-icon-theme
89 Requires: %{name} = %{version}-%{release}
93 Desktop files for Neovim.
102 -DPREFER_LUA=%{!?with_prefer_lua:OFF}%{?with_prefer_lua:ON} \
103 -DLUA_PRG=%{!?with_prefer_lua:/usr/bin/luajit}%{?with_prefer_lua:/usr/bin/lua5.1} \
104 -DLUA_INCLUDE_DIR=/usr/include/lua5.1 \
106 -DENABLE_JEMALLOC=ON \
107 -DLIBLUV_INCLUDE_DIR=%{luv_includedir} \
108 -DLIBLUV_LIBRARY=%{luv_library}
113 rm -rf $RPM_BUILD_ROOT
114 %{__make} -C build install \
115 DESTDIR=$RPM_BUILD_ROOT
117 install -d $RPM_BUILD_ROOT{/etc/xdg/nvim,%{_iconsdir}/hicolor/scalable/apps}
118 touch $RPM_BUILD_ROOT/etc/xdg/nvim/init.vim
119 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/nvim.svg
121 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cs.cp1250
122 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.euc-jp
123 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ko.UTF-8
124 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
125 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/pl.UTF-8
126 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sk.cp1250
127 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_CN.UTF-8
128 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_TW.UTF-8
133 rm -rf $RPM_BUILD_ROOT
136 %banner -e -o %{name} << 'EOF'
138 The Neovim executable is called 'nvim'. To use your existing Vim
140 ln -s ~/.vim ~/.config/nvim
141 ln -s ~/.vimrc ~/.config/nvim/init.vim
142 See ':help nvim' for more information on Neovim.
144 If you want support for Python plugins such as YouCompleteMe, you need
145 to install a Python module in addition to Neovim itself.
147 See ':help provider-python' or this page for more information:
148 http://neovim.io/doc/user/provider.html
150 If you have any questions, have a look at:
151 https://github.com/neovim/neovim/wiki/FAQ.
155 %update_desktop_database
156 %update_icon_cache hicolor
159 %update_desktop_database
160 %update_icon_cache hicolor
163 %defattr(644,root,root,755)
164 %doc BACKERS.md CONTRIBUTING.md LICENSE.txt README.md
166 %config(noreplace) %verify(not md5 mtime size) /etc/xdg/nvim/init.vim
167 %attr(755,root,root) %{_bindir}/nvim
168 %{_mandir}/man1/nvim.1*
172 %defattr(644,root,root,755)
173 %{_desktopdir}/nvim.desktop
174 %{_iconsdir}/hicolor/*/apps/nvim.png
175 %{_iconsdir}/hicolor/*/apps/nvim.svg