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