]> git.pld-linux.org Git - packages/neovim.git/blame - neovim.spec
Rename bcond to prefer_lua, fix for x32
[packages/neovim.git] / neovim.spec
CommitLineData
0a9d0af1
ER
1# TODO
2# - -rt subpackage? -lang subpackage?
cebcf7fb
ER
3# - <meta>-xxx keybindings (alt+something) incompatibility
4# https://github.com/neovim/neovim/issues/5576
ccead671
ER
5#
6# Conditional build:
1b20afad
ER
7%bcond_with prefer_lua # Prefer Lua over LuaJit
8
9%ifarch x32
10%define with_prefer_lua 1
11%endif
ccead671 12
0a9d0af1
ER
13Summary: Vim-fork focused on extensibility and agility
14Name: neovim
8d564b1d 15Version: 0.3.8
4350fc35 16Release: 1
0a9d0af1
ER
17License: Apache v2.0
18Group: Applications/Editors/Vim
6b16d9c4 19# Source0Download: https://github.com/neovim/neovim/releases
0a9d0af1 20Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz
8d564b1d 21# Source0-md5: 6b0eda6c3c6261c82f8a61f9c2d85fcd
0a9d0af1 22URL: https://neovim.io/
0a9d0af1 23Source2: %{name}.svg
6b16d9c4 24Patch0: desktop.patch
def4dbb8
ER
25Patch1: https://github.com/neovim/neovim/pull/12142.patch
26# Patch1-md5: 40bf36c33b4c49270243b39b916e164c
ccead671 27BuildRequires: cmake >= 2.8.7
ccead671 28BuildRequires: gcc >= 6:4.4
8c8b1ac4 29BuildRequires: gettext-devel
0a9d0af1 30BuildRequires: jemalloc-devel
0a9d0af1 31BuildRequires: libstdc++-devel
ccead671 32BuildRequires: libtermkey-devel
0a9d0af1 33BuildRequires: libuv-devel
58461eb4 34BuildRequires: libvterm-devel < 0.1.3
1ffaa605
ER
35BuildRequires: lua-bitop >= 1.0.2
36BuildRequires: lua-lpeg
37BuildRequires: lua-mpack >= 1.0.2
7d69921c 38BuildRequires: msgpack-devel >= 1.1.0
ccead671 39BuildRequires: pkgconfig
ccead671
ER
40BuildRequires: rpmbuild(macros) >= 1.596
41BuildRequires: unibilium-devel
1b20afad 42%if %{with prefer_lua}
2d2f06ed 43BuildRequires: lua51
1a0c55f9 44BuildRequires: lua51-devel
1ffaa605
ER
45%else
46BuildRequires: luajit-devel
ccead671
ER
47%endif
48Requires: desktop-file-utils
49Requires: gtk-update-icon-cache
50Requires: hicolor-icon-theme
0a9d0af1
ER
51Suggests: python-neovim
52Suggests: python3-neovim
3f05c041 53Suggests: ruby-neovim
0a9d0af1
ER
54Suggests: xsel
55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
a2169a2f
ER
57# gcc 4.0 and better turn on _FORTIFY_SOURCE=2 automatically. This currently
58# does not work with Neovim due to some uses of dynamically-sized structures.
59# See https://github.com/neovim/neovim/issues/223 for details.
60%define filterout_c -Wp,-D_FORTIFY_SOURCE=2
61
0a9d0af1
ER
62%description
63Neovim is a refactor - and sometimes redactor - in the tradition of
64Vim, which itself derives from Stevie. It is not a rewrite, but a
65continuation and extension of Vim. Many rewrites, clones, emulators
66and imitators exist; some are very clever, but none are Vim. Neovim
67strives to be a superset of Vim, notwithstanding some intentionally
68removed misfeatures; excepting those few and carefully-considered
69excisions, Neovim is Vim. It is built for users who want the good
70parts of Vim, without compromise, and more.
71
72%prep
73%setup -q
81796542 74%patch0 -p1
def4dbb8 75%patch1 -p1
0a9d0af1 76
0a9d0af1 77%build
7d69921c
ER
78install -d .deps build
79cd .deps
0a9d0af1 80%cmake \
7d69921c
ER
81 -DUSE_BUNDLED=OFF \
82 -DUSE_BUNDLED_JEMALLOC=OFF \
83 -DUSE_BUNDLED_UNIBILIUM=OFF \
84 -DUSE_BUNDLED_LIBTERMKEY=OFF \
85 -DUSE_BUNDLED_LIBVTERM=OFF \
86 -DUSE_BUNDLED_LIBUV=OFF \
87 -DUSE_BUNDLED_MSGPACK=OFF \
48fc3284
ER
88 -DUSE_BUNDLED_LUAJIT=OFF \
89 -DUSE_BUNDLED_LUAROCKS=OFF \
90 -DUSE_BUNDLED_LUV=OFF \
7d69921c
ER
91 ../third-party
92%{__make}
ccead671 93
7d69921c
ER
94cd ../build
95%cmake \
1b20afad 96 -DPREFER_LUA=%{!?with_prefer_lua:OFF}%{?with_prefer_lua:ON} \
2d2f06ed 97 -DLUA_PRG=/usr/bin/lua5.1 \
7d69921c
ER
98 -DENABLE_JEMALLOC=ON \
99 -DLUAJIT_USE_BUNDLED=OFF \
100 -DLIBUV_USE_BUNDLED=OFF \
101 -DMSGPACK_USE_BUNDLED=OFF \
102 -DUNIBILIUM_USE_BUNDLED=OFF \
103 -DLIBTERMKEY_USE_BUNDLED=OFF \
104 -DLIBVTERM_USE_BUNDLED=OFF \
105 -DJEMALLOC_USE_BUNDLED=OFF \
106 ..
0a9d0af1
ER
107
108%{__make}
109
110%install
111rm -rf $RPM_BUILD_ROOT
7d69921c 112%{__make} -C build install \
0a9d0af1
ER
113 DESTDIR=$RPM_BUILD_ROOT
114
6b16d9c4 115install -d $RPM_BUILD_ROOT{/etc/xdg/nvim,%{_iconsdir}/hicolor/scalable/apps}
3fb7b0d6 116touch $RPM_BUILD_ROOT/etc/xdg/nvim/init.vim
6b16d9c4 117cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/nvim.svg
0a9d0af1 118
46240029
ER
119%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cs.cp1250
120%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.euc-jp
46240029
ER
121%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ko.UTF-8
122%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
123%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/pl.UTF-8
46240029 124%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sk.cp1250
46240029 125%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_CN.UTF-8
46240029
ER
126%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_TW.UTF-8
127
0a9d0af1
ER
128%find_lang nvim
129
130%clean
131rm -rf $RPM_BUILD_ROOT
132
133%post
134%update_desktop_database
ccead671 135%update_icon_cache hicolor
b086dcf2
ER
136%banner -e -o %{name} << 'EOF'
137
138The Neovim executable is called 'nvim'. To use your existing Vim
139configuration:
140 ln -s ~/.vim ~/.config/nvim
141 ln -s ~/.vimrc ~/.config/nvim/init.vim
142See ':help nvim' for more information on Neovim.
143
144If you want support for Python plugins such as YouCompleteMe, you need
145to install a Python module in addition to Neovim itself.
146
147See ':help provider-python' or this page for more information:
148 http://neovim.io/doc/user/provider.html
149
150If you have any questions, have a look at:
151 https://github.com/neovim/neovim/wiki/FAQ.
152EOF
0a9d0af1
ER
153
154%postun
155%update_desktop_database
ccead671 156%update_icon_cache hicolor
0a9d0af1
ER
157
158%files -f nvim.lang
159%defattr(644,root,root,755)
160%doc BACKERS.md CONTRIBUTING.md LICENSE README.md
3fb7b0d6
ER
161%dir /etc/xdg/nvim
162%config(noreplace) %verify(not md5 mtime size) /etc/xdg/nvim/init.vim
0a9d0af1 163%attr(755,root,root) %{_bindir}/nvim
0a9d0af1 164%{_mandir}/man1/nvim.1*
6b16d9c4
ER
165%{_datadir}/nvim
166%{_desktopdir}/nvim.desktop
167%{_pixmapsdir}/nvim.png
168%{_iconsdir}/hicolor/*/apps/nvim.svg
This page took 0.076166 seconds and 4 git commands to generate.