2 # - -rt subpackage? -lang subpackage?
5 %bcond_with prefer_lua # Prefer Lua over LuaJit
7 %ifnarch %{ix86} %{x8664} %{arm} mips ppc
8 %define with_prefer_lua 1
11 Summary: Vim-fork focused on extensibility and agility
16 Group: Applications/Editors/Vim
17 # Source0Download: https://github.com/neovim/neovim/releases
18 Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: 526e6a9194d6d65fd5e7faa4b506e7c8
20 URL: https://neovim.io/
23 BuildRequires: cmake >= 2.8.12
24 BuildRequires: gcc >= 6:4.4
25 BuildRequires: gettext-devel
27 BuildRequires: jemalloc-devel
28 BuildRequires: libstdc++-devel
29 BuildRequires: libtermkey-devel >= 0.18
30 BuildRequires: libuv-devel >= 1.28.0
31 BuildRequires: libvterm-devel >= 0.1.0
32 BuildRequires: lua-bitop >= 1.0.2
33 BuildRequires: lua-lpeg
34 BuildRequires: lua-mpack >= 1.0.2
35 BuildRequires: msgpack-devel >= 1.1.0
36 BuildRequires: pkgconfig
37 BuildRequires: rpmbuild(macros) >= 1.605
38 BuildRequires: unibilium-devel >= 2.0.0
39 %if %{with prefer_lua}
41 BuildRequires: lua51-devel
43 BuildRequires: luajit-devel
45 Requires: desktop-file-utils
46 Requires: gtk-update-icon-cache
47 Requires: hicolor-icon-theme
48 Requires: libtermkey >= 0.18
49 Requires: libuv >= 1.28.0
50 Suggests: python-neovim
51 Suggests: python3-neovim
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 # gcc 4.0 and better turn on _FORTIFY_SOURCE=2 automatically. This currently
57 # does not work with Neovim due to some uses of dynamically-sized structures.
58 # See https://github.com/neovim/neovim/issues/223 for details.
59 %define filterout_c -Wp,-D_FORTIFY_SOURCE=2
62 Neovim is a refactor - and sometimes redactor - in the tradition of
63 Vim, which itself derives from Stevie. It is not a rewrite, but a
64 continuation and extension of Vim. Many rewrites, clones, emulators
65 and imitators exist; some are very clever, but none are Vim. Neovim
66 strives to be a superset of Vim, notwithstanding some intentionally
67 removed misfeatures; excepting those few and carefully-considered
68 excisions, Neovim is Vim. It is built for users who want the good
69 parts of Vim, without compromise, and more.
76 install -d .deps build
80 -DUSE_BUNDLED_JEMALLOC=OFF \
81 -DUSE_BUNDLED_UNIBILIUM=OFF \
82 -DUSE_BUNDLED_LIBTERMKEY=OFF \
83 -DUSE_BUNDLED_LIBVTERM=OFF \
84 -DUSE_BUNDLED_LIBUV=OFF \
85 -DUSE_BUNDLED_MSGPACK=OFF \
86 -DUSE_BUNDLED_LUAJIT=OFF \
87 -DUSE_BUNDLED_LUAROCKS=OFF \
88 -DUSE_BUNDLED_LUV=ON \
94 -DPREFER_LUA=%{!?with_prefer_lua:OFF}%{?with_prefer_lua:ON} \
95 -DLUA_PRG=/usr/bin/lua5.1 \
96 -DENABLE_JEMALLOC=ON \
97 -DLUAJIT_USE_BUNDLED=OFF \
98 -DLIBUV_USE_BUNDLED=OFF \
99 -DMSGPACK_USE_BUNDLED=OFF \
100 -DUNIBILIUM_USE_BUNDLED=OFF \
101 -DLIBTERMKEY_USE_BUNDLED=OFF \
102 -DLIBVTERM_USE_BUNDLED=OFF \
103 -DJEMALLOC_USE_BUNDLED=OFF \
109 rm -rf $RPM_BUILD_ROOT
110 %{__make} -C build install \
111 DESTDIR=$RPM_BUILD_ROOT
113 install -d $RPM_BUILD_ROOT{/etc/xdg/nvim,%{_iconsdir}/hicolor/scalable/apps}
114 touch $RPM_BUILD_ROOT/etc/xdg/nvim/init.vim
115 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/nvim.svg
117 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cs.cp1250
118 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.euc-jp
119 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ko.UTF-8
120 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
121 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/pl.UTF-8
122 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sk.cp1250
123 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_CN.UTF-8
124 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_TW.UTF-8
129 rm -rf $RPM_BUILD_ROOT
132 %update_desktop_database
133 %update_icon_cache hicolor
134 %banner -e -o %{name} << 'EOF'
136 The Neovim executable is called 'nvim'. To use your existing Vim
138 ln -s ~/.vim ~/.config/nvim
139 ln -s ~/.vimrc ~/.config/nvim/init.vim
140 See ':help nvim' for more information on Neovim.
142 If you want support for Python plugins such as YouCompleteMe, you need
143 to install a Python module in addition to Neovim itself.
145 See ':help provider-python' or this page for more information:
146 http://neovim.io/doc/user/provider.html
148 If you have any questions, have a look at:
149 https://github.com/neovim/neovim/wiki/FAQ.
153 %update_desktop_database
154 %update_icon_cache hicolor
157 %defattr(644,root,root,755)
158 %doc BACKERS.md CONTRIBUTING.md LICENSE README.md
160 %config(noreplace) %verify(not md5 mtime size) /etc/xdg/nvim/init.vim
161 %attr(755,root,root) %{_bindir}/nvim
162 %{_mandir}/man1/nvim.1*
164 %{_desktopdir}/nvim.desktop
165 %{_pixmapsdir}/nvim.png
166 %{_iconsdir}/hicolor/*/apps/nvim.svg