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