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