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