-# TODO
-# - use upstream gvim.desktop as base for our gvim .desktop files (more translations)
-#
#
# Conditional build:
%bcond_without static # don't build static version
%bcond_without heavy # don't build heavy (full-featured GNOME-based gvim/vim)
%bcond_without gui # don't build any GUI
%bcond_without light # don't build light (minimal, ncurses, but not static)
+%bcond_with lua # with Lua interp in vim package
%bcond_with perl # with Perl interp in vim package
%bcond_with python # with Python interp in vim package
%bcond_with ruby # with Ruby interp in vim package
# tail -n1 sources | awk '{print $2}'
# VCS Commits: https://github.com/vim/vim/commits/master
-%define ver 7.4
-%define basever %{ver}.979
-%define patchlevel %{nil}
-%define rel 1
+%define ver 7.4.979
+%define rel 4
Summary: Vi IMproved - a Vi clone
Summary(de.UTF-8): VIsual editor iMproved
Summary(es.UTF-8): Editor visual incrementado
Summary(tr.UTF-8): Gelişmiş bir vi sürümü
Summary(uk.UTF-8): Visual editor IMproved - Єдино Вірний Редактор :)
Name: vim
-Version: %{ver}.%{patchlevel}
+Version: %{ver}
+# keep macro for release, otherwise people tend to increment Epoch instead
Release: %{rel}
Epoch: 4
License: Charityware
Group: Applications/Editors/Vim
#Source0: ftp://ftp.vim.org/pub/vim/unix/%{name}-%{ver}.tar.bz2
-Source0: https://github.com/vim/vim/archive/v%{basever}.tar.gz
+Source0: https://github.com/vim/vim/archive/v%{ver}.tar.gz
# Source0-md5: dc289e3d5dd1b25e1e976ce7e704b47c
Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source1-md5: bc4d1e115ca506ad7751b9bd2b773a7f
Source2: http://skawina.eu.org/mikolaj/usr_doc_pl.zip
# Source2-md5: ff96284b1c913d55cf0877839b34d490
-Source10: g%{name}-athena.desktop
-Source11: g%{name}-motif.desktop
-Source12: g%{name}-gtk.desktop
-Source13: g%{name}-gnome.desktop
-Source14: %{name}.desktop
Source15: update-source.sh
# syntax files
# http://www.vim.org/scripts/script.php?script_id=1491 (0.7.5)
Source32: oceandeep.vim
# http://www.vim.org/scripts/script.php?script_id=1464 (2.6.3)
Source33: moria.vim
-%if 0
-%patchset_source -f ftp://ftp.vim.org/pub/editors/vim/patches/%{ver}/%{ver}.%03g 1 %{patchlevel}
-%endif
Patch0: %{name}-sysconfdir.patch
Patch1: %{name}-visual.patch
Patch2: %{name}-paths.patch
Patch37: %{name}-ft-mysql.patch
Patch38: %{name}-ft-gyp.patch
Patch39: %{name}-revert-7.4.165-noundo.patch
-Patch40: bug-512.patch
+Patch40: desktop.patch
+Patch41: %{name}-lua.patch
URL: http://www.vim.org/
BuildRequires: acl-devel
BuildRequires: autoconf
%if %{with selinux} || %{with heavy}
BuildRequires: libselinux-devel
%endif
+%if %{with lua} || %{with heavy}
+BuildRequires: lua52-devel
+%endif
%{?with_motif:BuildRequires: motif-devel}
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
Obsoletes: vim-enhanced
Obsoletes: vim-ispell
Obsoletes: vim-plugin-multvals
+Obsoletes: vim-syntax-golang <= 1.3.3-1
+Obsoletes: vim-syntax-lxc-docker <= 0.9.0-1
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# configure redefines it to =1
jak również GUI GTK+2.
%prep
-%setup -q -n vim-%{basever}
-
-%if 0
-# official patches
-# patches 7.4.802, 7.4.809 do not apply
-# 7.4.802 does not apply and 7.4.809 attempts to revert 7.4.802
-%patchset_patch 1 801
-%patchset_patch 803 808
-%patchset_patch 810 %{patchlevel}
-%endif
+%setup -q
+
+cp -p runtime/gvim.desktop gvim-athena.desktop
+cp -p runtime/gvim.desktop gvim-gnome.desktop
+cp -p runtime/gvim.desktop gvim-gtk.desktop
+cp -p runtime/gvim.desktop gvim-motif.desktop
%patch0 -p1
%patch1 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
+%patch41 -p1
cp -p %{SOURCE20} runtime/syntax
cp -p %{SOURCE22} runtime/syntax
%{__make} -j1 distclean
# add common options, can override (disable) if needed with args
%configure \
+ --%{!?with_lua:dis}%{?with_lua:en}able-luainterp \
--%{!?with_perl:dis}%{?with_perl:en}able-perlinterp \
--%{!?with_python:dis}%{?with_python:en}able-pythoninterp \
--%{!?with_ruby:dis}%{?with_ruby:en}able-rubyinterp \
--disable-gui \
--without-x \
--with-features=small \
+ --disable-luainterp \
--disable-perlinterp \
--disable-pythoninterp \
--disable-rubyinterp \
--disable-gui \
--without-x \
--with-features=small \
+ --disable-luainterp \
--disable-perlinterp \
--disable-pythoninterp \
--disable-rubyinterp \
--with-features=huge \
--disable-gui \
--without-x \
+ --enable-luainterp \
--enable-perlinterp \
--enable-pythoninterp \
--enable-rubyinterp \
--enable-gtk2-check \
--enable-gnome-check \
--with-x \
+ --enable-luainterp \
--enable-perlinterp \
--enable-pythoninterp \
--enable-rubyinterp \
ln -sf vi $RPM_BUILD_ROOT/bin/view
ln -sf vi $RPM_BUILD_ROOT/bin/rview
-cp -p %{SOURCE14} $RPM_BUILD_ROOT%{_desktopdir}
-
%if %{with athena}
-install -p src/bin/gvim.athena $RPM_BUILD_ROOT%{_bindir}/gvim.athena
-cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_desktopdir}
+install -p src/bin/gvim.athena $RPM_BUILD_ROOT%{_bindir}/gvim.athena
+cp -p gvim-athena.desktop $RPM_BUILD_ROOT%{_desktopdir}
%endif
%if %{with motif}
-install -p src/bin/gvim.motif $RPM_BUILD_ROOT%{_bindir}/gvim.motif
-cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_desktopdir}
+install -p src/bin/gvim.motif $RPM_BUILD_ROOT%{_bindir}/gvim.motif
+cp -p gvim-motif.desktop $RPM_BUILD_ROOT%{_desktopdir}
%endif
%if %{with gnome}
-install -p src/bin/gvim.gnome $RPM_BUILD_ROOT%{_bindir}/gvim.gnome
-cp -p %{SOURCE13} $RPM_BUILD_ROOT%{_desktopdir}
+install -p src/bin/gvim.gnome $RPM_BUILD_ROOT%{_bindir}/gvim.gnome
+cp -p gvim-gnome.desktop $RPM_BUILD_ROOT%{_desktopdir}
%endif
%if %{with gtk}
install -p src/bin/gvim.gtk $RPM_BUILD_ROOT%{_bindir}/gvim.gtk
+cp -p gvim-gtk.desktop $RPM_BUILD_ROOT%{_desktopdir}
ln -sf gvim.gtk $RPM_BUILD_ROOT%{_bindir}/gvim
ln -sf gvim $RPM_BUILD_ROOT%{_bindir}/eview
ln -sf gvim $RPM_BUILD_ROOT%{_bindir}/evim
ln -sf gvim $RPM_BUILD_ROOT%{_bindir}/gvimdiff
ln -sf gvim $RPM_BUILD_ROOT%{_bindir}/rgview
ln -sf gvim $RPM_BUILD_ROOT%{_bindir}/rgvim
-cp -p %{SOURCE12} $RPM_BUILD_ROOT%{_desktopdir}
%endif
%if %{with heavy}
install -p src/bin/vim.heavy $RPM_BUILD_ROOT%{_bindir}
%lang(ru) %{_mandir}/ru/man1/rvim.1*
%lang(ru) %{_mandir}/ru/man1/vim.1*
%lang(ru) %{_mandir}/ru/man1/vimdiff.1*
-%{_desktopdir}/%{name}.desktop
+%{_desktopdir}/vim.desktop
%if %{with static}
%files static