]> git.pld-linux.org Git - packages/neovim.git/blobdiff - neovim.spec
Rename bcond to prefer_lua, fix for x32
[packages/neovim.git] / neovim.spec
index 1b040d1a9d665fe92cca5d17c0955bd6572580a6..7b24fd3c9526e240956f86a7b6bff53da2f36e0c 100644 (file)
@@ -4,19 +4,26 @@
 #   https://github.com/neovim/neovim/issues/5576
 #
 # Conditional build:
-%bcond_without lua             # LUA
+%bcond_with    prefer_lua              # Prefer Lua over LuaJit
+
+%ifarch x32
+%define        with_prefer_lua 1
+%endif
 
 Summary:       Vim-fork focused on extensibility and agility
 Name:          neovim
-Version:       0.1.7
+Version:       0.3.8
 Release:       1
 License:       Apache v2.0
 Group:         Applications/Editors/Vim
+# Source0Download: https://github.com/neovim/neovim/releases
 Source0:       https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: f3acb6181f6888b620d11d1822fad982
+# Source0-md5: 6b0eda6c3c6261c82f8a61f9c2d85fcd
 URL:           https://neovim.io/
-Source1:       %{name}.desktop
 Source2:       %{name}.svg
+Patch0:                desktop.patch
+Patch1:                https://github.com/neovim/neovim/pull/12142.patch
+# Patch1-md5:  40bf36c33b4c49270243b39b916e164c
 BuildRequires: cmake >= 2.8.7
 BuildRequires: gcc >= 6:4.4
 BuildRequires: gettext-devel
@@ -24,16 +31,19 @@ BuildRequires:      jemalloc-devel
 BuildRequires: libstdc++-devel
 BuildRequires: libtermkey-devel
 BuildRequires: libuv-devel
-BuildRequires: libvterm-devel
+BuildRequires: libvterm-devel < 0.1.3
+BuildRequires: lua-bitop >= 1.0.2
+BuildRequires: lua-lpeg
+BuildRequires: lua-mpack >= 1.0.2
 BuildRequires: msgpack-devel >= 1.1.0
 BuildRequires: pkgconfig
 BuildRequires: rpmbuild(macros) >= 1.596
 BuildRequires: unibilium-devel
-%if %{with lua}
-BuildRequires: lua-bitop >= 1.0.2
-BuildRequires: lua-lpeg
-BuildRequires: lua-mpack >= 1.0.2
+%if %{with prefer_lua}
 BuildRequires: lua51
+BuildRequires: lua51-devel
+%else
+BuildRequires: luajit-devel
 %endif
 Requires:      desktop-file-utils
 Requires:      gtk-update-icon-cache
@@ -61,6 +71,8 @@ parts of Vim, without compromise, and more.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 install -d .deps build
@@ -81,6 +93,7 @@ cd .deps
 
 cd ../build
 %cmake \
+       -DPREFER_LUA=%{!?with_prefer_lua:OFF}%{?with_prefer_lua:ON} \
        -DLUA_PRG=/usr/bin/lua5.1 \
        -DENABLE_JEMALLOC=ON \
        -DLUAJIT_USE_BUNDLED=OFF \
@@ -99,10 +112,9 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT{/etc/xdg/nvim,%{_desktopdir},%{_iconsdir}/hicolor/scalable/apps}
+install -d $RPM_BUILD_ROOT{/etc/xdg/nvim,%{_iconsdir}/hicolor/scalable/apps}
 touch $RPM_BUILD_ROOT/etc/xdg/nvim/init.vim
-cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/neovim.desktop
-cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/neovim.svg
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/nvim.svg
 
 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cs.cp1250
 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.euc-jp
@@ -149,7 +161,8 @@ EOF
 %dir /etc/xdg/nvim
 %config(noreplace) %verify(not md5 mtime size) /etc/xdg/nvim/init.vim
 %attr(755,root,root) %{_bindir}/nvim
-%{_datadir}/nvim
-%{_desktopdir}/%{name}.desktop
-%{_iconsdir}/hicolor/*/apps/%{name}.svg
 %{_mandir}/man1/nvim.1*
+%{_datadir}/nvim
+%{_desktopdir}/nvim.desktop
+%{_pixmapsdir}/nvim.png
+%{_iconsdir}/hicolor/*/apps/nvim.svg
This page took 0.033542 seconds and 4 git commands to generate.