]> git.pld-linux.org Git - packages/neovim.git/blob - neovim.spec
Apply desktop.patch
[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 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 %patch0 -p1
66
67 %build
68 install -d .deps build
69 cd .deps
70 %cmake \
71         -DUSE_BUNDLED=OFF \
72         -DUSE_BUNDLED_JEMALLOC=OFF \
73         -DUSE_BUNDLED_UNIBILIUM=OFF \
74         -DUSE_BUNDLED_LIBTERMKEY=OFF \
75         -DUSE_BUNDLED_LIBVTERM=OFF \
76         -DUSE_BUNDLED_LIBUV=OFF \
77         -DUSE_BUNDLED_MSGPACK=OFF \
78         -DUSE_BUNDLED_LUAJIT=OFF \
79         -DUSE_BUNDLED_LUAROCKS=OFF \
80         -DUSE_BUNDLED_LUV=OFF \
81         ../third-party
82 %{__make}
83
84 cd ../build
85 %cmake \
86         -DLUA_PRG=/usr/bin/lua5.1 \
87         -DENABLE_JEMALLOC=ON \
88         -DLUAJIT_USE_BUNDLED=OFF \
89         -DLIBUV_USE_BUNDLED=OFF \
90         -DMSGPACK_USE_BUNDLED=OFF \
91         -DUNIBILIUM_USE_BUNDLED=OFF \
92         -DLIBTERMKEY_USE_BUNDLED=OFF \
93         -DLIBVTERM_USE_BUNDLED=OFF \
94         -DJEMALLOC_USE_BUNDLED=OFF \
95         ..
96
97 %{__make}
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 %{__make} -C build install \
102         DESTDIR=$RPM_BUILD_ROOT
103
104 install -d $RPM_BUILD_ROOT{/etc/xdg/nvim,%{_iconsdir}/hicolor/scalable/apps}
105 touch $RPM_BUILD_ROOT/etc/xdg/nvim/init.vim
106 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/nvim.svg
107
108 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cs.cp1250
109 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.euc-jp
110 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ko.UTF-8
111 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
112 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/pl.UTF-8
113 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sk.cp1250
114 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_CN.UTF-8
115 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_TW.UTF-8
116
117 %find_lang nvim
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %post
123 %update_desktop_database
124 %update_icon_cache hicolor
125 %banner -e -o %{name} << 'EOF'
126
127 The Neovim executable is called 'nvim'. To use your existing Vim
128 configuration:
129     ln -s ~/.vim ~/.config/nvim
130     ln -s ~/.vimrc ~/.config/nvim/init.vim
131 See ':help nvim' for more information on Neovim.
132
133 If you want support for Python plugins such as YouCompleteMe, you need
134 to install a Python module in addition to Neovim itself.
135
136 See ':help provider-python' or this page for more information:
137     http://neovim.io/doc/user/provider.html
138
139 If you have any questions, have a look at:
140     https://github.com/neovim/neovim/wiki/FAQ.
141 EOF
142
143 %postun
144 %update_desktop_database
145 %update_icon_cache hicolor
146
147 %files -f nvim.lang
148 %defattr(644,root,root,755)
149 %doc BACKERS.md CONTRIBUTING.md LICENSE README.md
150 %dir /etc/xdg/nvim
151 %config(noreplace) %verify(not md5 mtime size) /etc/xdg/nvim/init.vim
152 %attr(755,root,root) %{_bindir}/nvim
153 %{_mandir}/man1/nvim.1*
154 %{_datadir}/nvim
155 %{_desktopdir}/nvim.desktop
156 %{_pixmapsdir}/nvim.png
157 %{_iconsdir}/hicolor/*/apps/nvim.svg
This page took 0.087854 seconds and 3 git commands to generate.