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