]> git.pld-linux.org Git - packages/neovim.git/blob - neovim.spec
up to 0.1.6
[packages/neovim.git] / neovim.spec
1 # TODO
2 # - -rt subpackage? -lang subpackage?
3 # - <meta>-xxx keybindings do not work (alt+something)
4 #
5 # Conditional build:
6 %bcond_without  lua             # LUA
7
8 Summary:        Vim-fork focused on extensibility and agility
9 Name:           neovim
10 Version:        0.1.6
11 Release:        1
12 License:        Apache v2.0
13 Group:          Applications/Editors/Vim
14 Source0:        https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  307978937c7fc2ebd796b345d99ed7cd
16 URL:            https://neovim.io/
17 Source1:        %{name}.desktop
18 Source2:        %{name}.svg
19 BuildRequires:  cmake >= 2.8.7
20 BuildRequires:  gcc >= 6:4.4
21 BuildRequires:  gettext-devel
22 BuildRequires:  jemalloc-devel
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  libtermkey-devel
25 BuildRequires:  libuv-devel
26 BuildRequires:  libvterm-devel
27 BuildRequires:  msgpack-devel >= 1.1.0
28 BuildRequires:  pkgconfig
29 BuildRequires:  rpmbuild(macros) >= 1.596
30 BuildRequires:  unibilium-devel
31 %if %{with lua}
32 BuildRequires:  lua-bitop >= 1.0.2
33 BuildRequires:  lua-lpeg
34 BuildRequires:  lua-mpack >= 1.0.2
35 BuildRequires:  lua51
36 %endif
37 Requires:       desktop-file-utils
38 Requires:       gtk-update-icon-cache
39 Requires:       hicolor-icon-theme
40 Suggests:       python-neovim
41 Suggests:       python3-neovim
42 Suggests:       ruby-neovim
43 Suggests:       xsel
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 # gcc 4.0 and better turn on _FORTIFY_SOURCE=2 automatically. This currently
47 # does not work with Neovim due to some uses of dynamically-sized structures.
48 # See https://github.com/neovim/neovim/issues/223 for details.
49 %define         filterout_c     -Wp,-D_FORTIFY_SOURCE=2
50
51 %description
52 Neovim is a refactor - and sometimes redactor - in the tradition of
53 Vim, which itself derives from Stevie. It is not a rewrite, but a
54 continuation and extension of Vim. Many rewrites, clones, emulators
55 and imitators exist; some are very clever, but none are Vim. Neovim
56 strives to be a superset of Vim, notwithstanding some intentionally
57 removed misfeatures; excepting those few and carefully-considered
58 excisions, Neovim is Vim. It is built for users who want the good
59 parts of Vim, without compromise, and more.
60
61 %prep
62 %setup -q
63
64 %build
65 install -d .deps build
66 cd .deps
67 %cmake \
68         -DUSE_BUNDLED=OFF \
69         -DUSE_BUNDLED_JEMALLOC=OFF \
70         -DUSE_BUNDLED_UNIBILIUM=OFF \
71         -DUSE_BUNDLED_LIBTERMKEY=OFF \
72         -DUSE_BUNDLED_LIBVTERM=OFF \
73         -DUSE_BUNDLED_LIBUV=OFF \
74         -DUSE_BUNDLED_MSGPACK=OFF \
75         -DUSE_BUNDLED_LUAJIT=OFF \
76         -DUSE_BUNDLED_LUAROCKS=OFF \
77         -DUSE_BUNDLED_LUV=OFF \
78         ../third-party
79 %{__make}
80
81 cd ../build
82 %cmake \
83         -DLUA_PRG=/usr/bin/lua5.1 \
84         -DENABLE_JEMALLOC=ON \
85         -DLUAJIT_USE_BUNDLED=OFF \
86         -DLIBUV_USE_BUNDLED=OFF \
87         -DMSGPACK_USE_BUNDLED=OFF \
88         -DUNIBILIUM_USE_BUNDLED=OFF \
89         -DLIBTERMKEY_USE_BUNDLED=OFF \
90         -DLIBVTERM_USE_BUNDLED=OFF \
91         -DJEMALLOC_USE_BUNDLED=OFF \
92         ..
93
94 %{__make}
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98 %{__make} -C build install \
99         DESTDIR=$RPM_BUILD_ROOT
100
101 install -d $RPM_BUILD_ROOT{/etc/xdg/nvim,%{_desktopdir},%{_iconsdir}/hicolor/scalable/apps}
102 touch $RPM_BUILD_ROOT/etc/xdg/nvim/init.vim
103 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/neovim.desktop
104 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/neovim.svg
105
106 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cs.cp1250
107 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.euc-jp
108 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.sjis
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}/pl.cp1250
113 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ru.cp1251
114 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sk.cp1250
115 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/uk.cp1251
116 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_CN.UTF-8
117 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_CN.cp936
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 %{_datadir}/nvim
157 %{_desktopdir}/%{name}.desktop
158 %{_iconsdir}/hicolor/*/apps/%{name}.svg
159 %{_mandir}/man1/nvim.1*
This page took 0.062171 seconds and 3 git commands to generate.