]> git.pld-linux.org Git - packages/neovim.git/blob - neovim.spec
Requires unibilium 2.0.0
[packages/neovim.git] / neovim.spec
1 # TODO
2 # - -rt subpackage? -lang subpackage?
3 # - <meta>-xxx keybindings (alt+something) incompatibility
4 #   https://github.com/neovim/neovim/issues/5576
5 #
6 # Conditional build:
7 %bcond_with     prefer_lua              # Prefer Lua over LuaJit
8
9 %ifarch x32
10 %define with_prefer_lua 1
11 %endif
12
13 Summary:        Vim-fork focused on extensibility and agility
14 Name:           neovim
15 Version:        0.4.4
16 Release:        1
17 License:        Apache v2.0
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/
23 Source2:        %{name}.svg
24 Patch0:         desktop.patch
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}
41 BuildRequires:  lua51
42 BuildRequires:  lua51-devel
43 %else
44 BuildRequires:  luajit-devel
45 %endif
46 Requires:       desktop-file-utils
47 Requires:       gtk-update-icon-cache
48 Requires:       hicolor-icon-theme
49 Suggests:       python-neovim
50 Suggests:       python3-neovim
51 Suggests:       ruby-neovim
52 Suggests:       xsel
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
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
60 %description
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.
69
70 %prep
71 %setup -q
72 %patch0 -p1
73
74 %build
75 install -d .deps build
76 cd .deps
77 %cmake \
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 \
85         -DUSE_BUNDLED_LUAJIT=OFF \
86         -DUSE_BUNDLED_LUAROCKS=OFF \
87         -DUSE_BUNDLED_LUV=OFF \
88         ../third-party
89 %{__make}
90
91 cd ../build
92 %cmake \
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 \
103         ..
104
105 %{__make}
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 %{__make} -C build install \
110         DESTDIR=$RPM_BUILD_ROOT
111
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
115
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
124
125 %find_lang nvim
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %post
131 %update_desktop_database
132 %update_icon_cache hicolor
133 %banner -e -o %{name} << 'EOF'
134
135 The Neovim executable is called 'nvim'. To use your existing Vim
136 configuration:
137     ln -s ~/.vim ~/.config/nvim
138     ln -s ~/.vimrc ~/.config/nvim/init.vim
139 See ':help nvim' for more information on Neovim.
140
141 If you want support for Python plugins such as YouCompleteMe, you need
142 to install a Python module in addition to Neovim itself.
143
144 See ':help provider-python' or this page for more information:
145     http://neovim.io/doc/user/provider.html
146
147 If you have any questions, have a look at:
148     https://github.com/neovim/neovim/wiki/FAQ.
149 EOF
150
151 %postun
152 %update_desktop_database
153 %update_icon_cache hicolor
154
155 %files -f nvim.lang
156 %defattr(644,root,root,755)
157 %doc BACKERS.md CONTRIBUTING.md LICENSE README.md
158 %dir /etc/xdg/nvim
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*
162 %{_datadir}/nvim
163 %{_desktopdir}/nvim.desktop
164 %{_pixmapsdir}/nvim.png
165 %{_iconsdir}/hicolor/*/apps/nvim.svg
This page took 0.087348 seconds and 3 git commands to generate.