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