]> git.pld-linux.org Git - packages/neovim.git/blame - neovim.spec
Requires unibilium 2.0.0
[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
3d9c6b0d 15Version: 0.4.4
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
3d9c6b0d 21# Source0-md5: 526e6a9194d6d65fd5e7faa4b506e7c8
0a9d0af1 22URL: https://neovim.io/
0a9d0af1 23Source2: %{name}.svg
6b16d9c4 24Patch0: desktop.patch
ccead671 25BuildRequires: cmake >= 2.8.7
ccead671 26BuildRequires: gcc >= 6:4.4
8c8b1ac4 27BuildRequires: gettext-devel
0a9d0af1 28BuildRequires: jemalloc-devel
0a9d0af1 29BuildRequires: libstdc++-devel
ccead671 30BuildRequires: libtermkey-devel
0a9d0af1 31BuildRequires: libuv-devel
58461eb4 32BuildRequires: libvterm-devel < 0.1.3
1ffaa605
ER
33BuildRequires: lua-bitop >= 1.0.2
34BuildRequires: lua-lpeg
35BuildRequires: lua-mpack >= 1.0.2
7d69921c 36BuildRequires: msgpack-devel >= 1.1.0
ccead671 37BuildRequires: pkgconfig
ccead671 38BuildRequires: rpmbuild(macros) >= 1.596
6fff6319 39BuildRequires: unibilium-devel >= 2.0.0
1b20afad 40%if %{with prefer_lua}
2d2f06ed 41BuildRequires: lua51
1a0c55f9 42BuildRequires: lua51-devel
1ffaa605
ER
43%else
44BuildRequires: luajit-devel
ccead671
ER
45%endif
46Requires: desktop-file-utils
47Requires: gtk-update-icon-cache
48Requires: hicolor-icon-theme
0a9d0af1
ER
49Suggests: python-neovim
50Suggests: python3-neovim
3f05c041 51Suggests: ruby-neovim
0a9d0af1
ER
52Suggests: xsel
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
a2169a2f
ER
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
59
0a9d0af1
ER
60%description
61Neovim is a refactor - and sometimes redactor - in the tradition of
62Vim, which itself derives from Stevie. It is not a rewrite, but a
63continuation and extension of Vim. Many rewrites, clones, emulators
64and imitators exist; some are very clever, but none are Vim. Neovim
65strives to be a superset of Vim, notwithstanding some intentionally
66removed misfeatures; excepting those few and carefully-considered
67excisions, Neovim is Vim. It is built for users who want the good
68parts of Vim, without compromise, and more.
69
70%prep
71%setup -q
81796542 72%patch0 -p1
0a9d0af1 73
0a9d0af1 74%build
7d69921c
ER
75install -d .deps build
76cd .deps
0a9d0af1 77%cmake \
7d69921c
ER
78 -DUSE_BUNDLED=OFF \
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 \
48fc3284
ER
85 -DUSE_BUNDLED_LUAJIT=OFF \
86 -DUSE_BUNDLED_LUAROCKS=OFF \
87 -DUSE_BUNDLED_LUV=OFF \
7d69921c
ER
88 ../third-party
89%{__make}
ccead671 90
7d69921c
ER
91cd ../build
92%cmake \
1b20afad 93 -DPREFER_LUA=%{!?with_prefer_lua:OFF}%{?with_prefer_lua:ON} \
2d2f06ed 94 -DLUA_PRG=/usr/bin/lua5.1 \
7d69921c
ER
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 \
103 ..
0a9d0af1
ER
104
105%{__make}
106
107%install
108rm -rf $RPM_BUILD_ROOT
7d69921c 109%{__make} -C build install \
0a9d0af1
ER
110 DESTDIR=$RPM_BUILD_ROOT
111
6b16d9c4 112install -d $RPM_BUILD_ROOT{/etc/xdg/nvim,%{_iconsdir}/hicolor/scalable/apps}
3fb7b0d6 113touch $RPM_BUILD_ROOT/etc/xdg/nvim/init.vim
6b16d9c4 114cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/nvim.svg
0a9d0af1 115
46240029
ER
116%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cs.cp1250
117%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.euc-jp
46240029
ER
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
46240029 121%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sk.cp1250
46240029 122%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_CN.UTF-8
46240029
ER
123%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_TW.UTF-8
124
0a9d0af1
ER
125%find_lang nvim
126
127%clean
128rm -rf $RPM_BUILD_ROOT
129
130%post
131%update_desktop_database
ccead671 132%update_icon_cache hicolor
b086dcf2
ER
133%banner -e -o %{name} << 'EOF'
134
135The Neovim executable is called 'nvim'. To use your existing Vim
136configuration:
137 ln -s ~/.vim ~/.config/nvim
138 ln -s ~/.vimrc ~/.config/nvim/init.vim
139See ':help nvim' for more information on Neovim.
140
141If you want support for Python plugins such as YouCompleteMe, you need
142to install a Python module in addition to Neovim itself.
143
144See ':help provider-python' or this page for more information:
145 http://neovim.io/doc/user/provider.html
146
147If you have any questions, have a look at:
148 https://github.com/neovim/neovim/wiki/FAQ.
149EOF
0a9d0af1
ER
150
151%postun
152%update_desktop_database
ccead671 153%update_icon_cache hicolor
0a9d0af1
ER
154
155%files -f nvim.lang
156%defattr(644,root,root,755)
157%doc BACKERS.md CONTRIBUTING.md LICENSE README.md
3fb7b0d6
ER
158%dir /etc/xdg/nvim
159%config(noreplace) %verify(not md5 mtime size) /etc/xdg/nvim/init.vim
0a9d0af1 160%attr(755,root,root) %{_bindir}/nvim
0a9d0af1 161%{_mandir}/man1/nvim.1*
6b16d9c4
ER
162%{_datadir}/nvim
163%{_desktopdir}/nvim.desktop
164%{_pixmapsdir}/nvim.png
165%{_iconsdir}/hicolor/*/apps/nvim.svg
This page took 0.118067 seconds and 4 git commands to generate.