%bcond_without gnome # don't build GNOME-based gvim support
%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 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
%endif
# Command to check for latest patch:
-# curl -s ftp://ftp.vim.org/pub/editors/vim/patches/7.3/MD5SUMS | grep -vF .gz | tail -n1 | awk '{print $2}'
+# wget ftp://ftp.vim.org/pub/editors/vim/patches/7.4/MD5SUMS -O sources
+# tail -n1 sources | awk '{print $2}'
+# VCS Commits: https://code.google.com/p/vim/source/browse/
-%define ver 7.3
-%define patchlevel 515
+%define ver 7.4
+%define patchlevel 206
%define rel 1
Summary: Vi IMproved - a Vi clone
Summary(de.UTF-8): VIsual editor iMproved
License: Charityware
Group: Applications/Editors/Vim
Source0: ftp://ftp.vim.org/pub/vim/unix/%{name}-%{ver}.tar.bz2
-# Source0-md5: 5b9510a17074e2b37d8bb38ae09edbf2
+# Source0-md5: 607e135c559be642f210094ad023dc65
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
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)
Source20: javascript.vim
# http://www.vim.org/scripts/script.php?script_id=447 (20040206)
Source22: exim.vim
-# http://www.vim.org/scripts/script.php?script_id=1571 (0.9.7)
-Source23: php.vim
# color schemes
# http://www.vim.org/scripts/script.php?script_id=415 (1.15)
Source30: zenburn.vim
Source32: oceandeep.vim
# http://www.vim.org/scripts/script.php?script_id=1464 (2.6.3)
Source33: moria.vim
-%patchset_source -f ftp://ftp.vim.org/pub/editors/vim/patches/7.3/7.3.%03g 1 %{patchlevel}
+%patchset_source -f ftp://ftp.vim.org/pub/editors/vim/patches/%{ver}/%{ver}.%03g 1 %{patchlevel}
Patch0: %{name}-sysconfdir.patch
Patch1: %{name}-visual.patch
Patch2: %{name}-paths.patch
Patch22: %{name}-man_installation.patch
Patch23: %{name}-vimrc.patch
Patch24: %{name}-syntax-exports.patch
-Patch25: %{name}-syntax-sshconfig.patch
-Patch102: %{name}-gtkfilechooser.patch
-Patch104: %{name}-home_etc.patch
-Patch105: %{name}-autopaste.patch
-Patch106: %{name}-ft-cron.patch
-Patch108: %{name}-phpscript.patch
-Patch109: %{name}-pam.patch
-Patch110: %{name}-ft-bash.patch
-Patch112: %{name}-localedir.patch
-Patch113: %{name}-locales.patch
-Patch114: %{name}-rtdir.patch
-Patch115: %{name}-ft-mib.patch
-Patch116: %{name}-ft-lib-udevrules.patch
-Patch117: %{name}-ft-mysql.patch
+Patch25: sudoers-include.patch
+Patch26: %{name}-home_etc.patch
+Patch27: %{name}-autopaste.patch
+Patch28: %{name}-ft-cron.patch
+Patch29: %{name}-phpscript.patch
+Patch30: %{name}-pam.patch
+Patch31: %{name}-ft-bash.patch
+Patch32: %{name}-localedir.patch
+Patch33: %{name}-locales.patch
+Patch34: %{name}-rtdir.patch
+Patch35: %{name}-ft-mib.patch
+Patch36: %{name}-ft-lib-udevrules.patch
+Patch37: %{name}-ft-mysql.patch
+Patch38: %{name}-ft-gyp.patch
+Patch39: %{name}-revert-7.4.165-noundo.patch
URL: http://www.vim.org/
BuildRequires: acl-devel
BuildRequires: autoconf
%if %{with selinux} || %{with heavy}
BuildRequires: libselinux-devel
%endif
+%{?with_motif:BuildRequires: motif-devel}
BuildRequires: ncurses-devel
-%{?with_motif:BuildRequires: openmotif-devel}
BuildRequires: pkgconfig
%if %{with perl} || %{with heavy}
BuildRequires: perl-devel
Obsoletes: vim-static
%endif
BuildRequires: unzip
-Requires: %{name}-rt = %{epoch}:%{version}-%{release}
+Suggests: %{name}-rt = %{epoch}:%{version}-%{release}
Provides: vi-editor
Provides: vi
Provides: vim-editor = %{epoch}:%{version}-%{release}
# configure redefines it to =1
%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]*
+%define filterout_c -Wp,-D_FORTIFY_SOURCE=2
# that's example script
%define _noautoreq '/bin/csh'
VIM (Vi IMproved) è una versione aggiornata e perfezionata dell'editor
vi. Vi è stato il primo editor per UNIX realmente basato su video ed è
ancora molto diffuso. VIM perfeziona vi aggiungendo nuove funzioni:
-finestre multiple, funzione \"annulla\" multilivello, evidenziazione
-dei blocchi e altro.
+finestre multiple, funzione "annulla" multilivello, evidenziazione dei
+blocchi e altro.
%description -l pl.UTF-8
Edytor tekstu podobny do Vi. Ważne ulepszenia: możliwość pracy w wielu
Pakiet ten dostarcza w pełni funkcjonalną wersję Vima, czyli
zawierającą obsługę skryptów w językach Perl, Python, Ruby oraz Tcl.
+%package light
+Summary: Minimal build of Vim
+Summary(pl.UTF-8): Minimalna wersja vima
+Group: Applications/Editors/Vim
+Provides: vi-editor
+Provides: vi
+Provides: vim-editor = %{epoch}:%{version}-%{release}
+
+%description light
+This package provides light featured version of Vim.
+
+%description light -l pl.UTF-8
+Pakiet ten dostarcza minimalną wersję Vima.
+
+%package -n vimx
+Summary: Vi IMproved - a Vi clone
+Summary(pl.UTF-8): Vi IMproved - klon edytora Vi
+Group: X11/Applications/Editors
+Requires: %{name}-rt = %{epoch}:%{version}-%{release}
+Provides: vi-editor
+Provides: vi
+Provides: vim-editor = %{epoch}:%{version}-%{release}
+Obsoletes: vim-enhanced
+Obsoletes: vim-ispell
+Obsoletes: vim-plugin-multvals
+
+%description -n vimx
+This package provides console version of Vim, with support for basic
+X11 features like system clipboard.
+
+%description -n vimx -l pl.UTF-8
+Pakiet ten dostarcza konsolową wersję Vima, posiadającą wsparcie dla
+podstawowych funckcji X11, takich jak systemowy schowek.
+
%package static
Summary: Statically linked Vim
Summary(hu.UTF-8): A Vim statikus verziója
Requires: vim-plugin-securemodelines
Obsoletes: gvim-bonobo
Obsoletes: vim-common
+Obsoletes: vim-syntax-gitcommit
+Obsoletes: vim-syntax-upstart
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description rt
This package contains macros, documentation, syntax configuration and
Summary(pl.UTF-8): Dodatkowe pliki uruchomieniowe Vima
Group: Applications/Editors/Vim
Requires: %{name}-rt = %{epoch}:%{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description rt-extras
This package contains more runtime extra files, not really useful. If
Group: Applications/Editors/Vim
Requires: %{name}-rt = %{epoch}:%{version}-%{release}
Requires: gzip
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description doc
This package contains Vim documentation accessible from vim itself
using :help command.
%description doc -l pl.UTF-8
-Ten pakiet zawiera dokumentację do Vima dostępną z poziomu samego
-vima za pomocą polecenia :help.
+Ten pakiet zawiera dokumentację do Vima dostępną z poziomu samego vima
+za pomocą polecenia :help.
%package spell-en
Summary: English dictionaries for VIMspell
Summary(pl.UTF-8): Angielskie słowniki dla VIMspella
Group: Applications/Editors/Vim
Requires: %{name}-rt = %{epoch}:%{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description spell-en
English dictionaries for VIMspell.
Requires: %{name}-rt = %{epoch}:%{version}-%{release}
Requires: mktemp
Requires: vim-editor = %{epoch}:%{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description tutor
This package contains Vim tutorial.
jak również GUI GTK+2.
%prep
-%setup -q -n %{name}73
+%setup -q -n %{name}74
# official patches
%patchset_patch 1 %{patchlevel}
%patch23 -p1
%patch24 -p1
%patch25 -p1
-
-# home etc
-%{?with_home_etc:%patch104 -p1}
+%{?with_home_etc:%patch26 -p1}
# autopaste patch - automatically switch to paste mode
# when `really fast typing' situation happens
-%patch105 -p1
-
-%patch106 -p1
-
-%patch108 -p1
-%patch109 -p1
-%patch110 -p1
-%patch112 -p1
-%patch113 -p1
-%patch114 -p1
-%patch115 -p1
-%patch116 -p1
-%patch117 -p1
-
-cp -a %{SOURCE20} runtime/syntax
-cp -a %{SOURCE22} runtime/syntax
-cp -a %{SOURCE23} runtime/syntax
-cp -a %{SOURCE30} runtime/colors
-cp -a %{SOURCE31} runtime/colors
-cp -a %{SOURCE32} runtime/colors
+%patch27 -p1
+%patch28 -p1
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch35 -p1
+%patch36 -p1
+%patch37 -p1
+%patch38 -p1
+%patch39 -p1
+
+cp -p %{SOURCE20} runtime/syntax
+cp -p %{SOURCE22} runtime/syntax
+cp -p %{SOURCE30} runtime/colors
+cp -p %{SOURCE31} runtime/colors
+cp -p %{SOURCE32} runtime/colors
%{__unzip} -qd runtime/doc %{SOURCE2}
# remove unsupported locales
-rm -f src/po/zh_{CN,TW}.UTF-8.po
-rm -f runtime/lang/menu_zh_{cn,tw}.utf-8.vim
+%{__rm} src/po/zh_{CN,TW}.UTF-8.po
+%{__rm} runtime/lang/menu_zh_{cn,tw}.utf-8.vim
# fix nb/no
-mv -f src/po/n{o,b}.po
-mv -f runtime/tutor/tutor.n{o,b}
-mv -f runtime/tutor/tutor.n{o,b}.utf-8
-mv -f runtime/lang/menu_n{o,b}.latin1.vim
-mv -f runtime/lang/menu_n{o,b}.utf-8.vim
-mv -f runtime/lang/menu_n{o,b}_no.latin1.vim
-mv -f runtime/lang/menu_n{o,b}_no.utf-8.vim
+%{__mv} src/po/n{o,b}.po
+%{__mv} runtime/tutor/tutor.n{o,b}
+%{__mv} runtime/tutor/tutor.n{o,b}.utf-8
+%{__mv} runtime/lang/menu_n{o,b}.latin1.vim
+%{__mv} runtime/lang/menu_n{o,b}.utf-8.vim
+%{__mv} runtime/lang/menu_n{o,b}_no.latin1.vim
+%{__mv} runtime/lang/menu_n{o,b}_no.utf-8.vim
%build
cd src
LDFLAGS="%{rpmldflags}"
%endif
+%if %{with light}
+build vim.light \
+ --disable-gui \
+ --without-x \
+ --with-features=small \
+ --disable-perlinterp \
+ --disable-pythoninterp \
+ --disable-rubyinterp \
+ --disable-tclinterp \
+ --disable-cscope \
+ --disable-gpm \
+ --disable-nls
+%endif
+
build vim.ncurses \
--disable-gui \
--without-x \
--with-features=huge
+build vimx \
+ --disable-gui \
+ --with-x \
+ --with-features=huge
+
%if %{with athena}
build gvim.athena \
--with-features=huge \
%{__make} -j1 install \
DESTDIR=$RPM_BUILD_ROOT
+# not supported locales added by 7.3.764 or later
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cs.cp1250
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.sjis
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.euc-jp
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/pl.UTF-8
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/pl.cp1250
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ru.cp1251
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sk.cp1250
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/uk.cp1251
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_CN.cp936
+
%find_lang %{name}
# use compressed docs, see :help gzip-helpfile
install -p src/bin/vim.ncurses $RPM_BUILD_ROOT/bin/vi
ln -sf /bin/vi $RPM_BUILD_ROOT%{_bindir}/vim
%endif
+install -p src/bin/vimx $RPM_BUILD_ROOT%{_bindir}/vimx
install -p src/xxd/xxd $RPM_BUILD_ROOT%{_bindir}/xxd
install -p src/vimtutor $RPM_BUILD_ROOT%{_bindir}/vimtutor
-echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/vi.1
-echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/view.1
+echo ".so man1/vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/vi.1
+echo ".so man1/vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/view.1
# not supported directories
%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/??.*/
ln -sf vi $RPM_BUILD_ROOT/bin/view
ln -sf vi $RPM_BUILD_ROOT/bin/rview
-cp -a %{SOURCE14} $RPM_BUILD_ROOT%{_desktopdir}
+cp -p %{SOURCE14} $RPM_BUILD_ROOT%{_desktopdir}
%if %{with athena}
install -p src/bin/gvim.athena $RPM_BUILD_ROOT%{_bindir}/gvim.athena
-cp -a %{SOURCE10} $RPM_BUILD_ROOT%{_desktopdir}
+cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_desktopdir}
%endif
%if %{with motif}
install -p src/bin/gvim.motif $RPM_BUILD_ROOT%{_bindir}/gvim.motif
-cp -a %{SOURCE11} $RPM_BUILD_ROOT%{_desktopdir}
+cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_desktopdir}
%endif
%if %{with gnome}
install -p src/bin/gvim.gnome $RPM_BUILD_ROOT%{_bindir}/gvim.gnome
-cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_desktopdir}
+cp -p %{SOURCE13} $RPM_BUILD_ROOT%{_desktopdir}
%endif
%if %{with gtk}
install -p src/bin/gvim.gtk $RPM_BUILD_ROOT%{_bindir}/gvim.gtk
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 -a %{SOURCE12} $RPM_BUILD_ROOT%{_desktopdir}
+cp -p %{SOURCE12} $RPM_BUILD_ROOT%{_desktopdir}
%endif
%if %{with heavy}
install -p src/bin/vim.heavy $RPM_BUILD_ROOT%{_bindir}
install -p src/bin/gvim.heavy $RPM_BUILD_ROOT%{_bindir}
%endif
+%if %{with light}
+install -p src/bin/vim.light $RPM_BUILD_ROOT%{_bindir}
+%endif
install -d $RPM_BUILD_ROOT%{_pixmapsdir}
-cp -a runtime/vim48x48.png $RPM_BUILD_ROOT%{_pixmapsdir}/vim.png
+cp -p runtime/vim48x48.png $RPM_BUILD_ROOT%{_pixmapsdir}/vim.png
bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
%lang(it) %{_mandir}/it/man1/rvim.1*
%lang(it) %{_mandir}/it/man1/vim.1*
%lang(it) %{_mandir}/it/man1/vimdiff.1*
+%lang(ja) %{_mandir}/ja/man1/rvim.1*
+%lang(ja) %{_mandir}/ja/man1/vim.1*
+%lang(ja) %{_mandir}/ja/man1/vimdiff.1*
%lang(pl) %{_mandir}/pl/man1/rvim.1*
%lang(pl) %{_mandir}/pl/man1/vim.1*
%lang(pl) %{_mandir}/pl/man1/vimdiff.1*
%lang(it) %{_mandir}/it/man1/ex.1*
%lang(it) %{_mandir}/it/man1/view.1*
%lang(it) %{_mandir}/it/man1/rview.1*
+%lang(ja) %{_mandir}/ja/man1/ex.1*
+%lang(ja) %{_mandir}/ja/man1/view.1*
+%lang(ja) %{_mandir}/ja/man1/rview.1*
%lang(pl) %{_mandir}/pl/man1/vi.1*
%lang(pl) %{_mandir}/pl/man1/ex.1*
%lang(pl) %{_mandir}/pl/man1/view.1*
%{_mandir}/man1/xxd.1*
%lang(fr) %{_mandir}/fr/man1/xxd.1*
%lang(it) %{_mandir}/it/man1/xxd.1*
+%lang(ja) %{_mandir}/ja/man1/xxd.1*
%lang(pl) %{_mandir}/pl/man1/xxd.1*
%lang(ru) %{_mandir}/ru/man1/xxd.1*
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vim/gvimrc
%dir %{_datadir}/vim
+%dir %{_datadir}/vim/doc
%dir %{_datadir}/vim/vimfiles
%dir %{_datadir}/vim/vimfiles/doc
%lang(zh_TW) %{_datadir}/vim/lang/menu_*taiwan*
%dir %{_datadir}/vim/spell
+%{_datadir}/vim/spell/spell.vim
%lang(he) %{_datadir}/vim/spell/he.*
%lang(yi) %{_datadir}/vim/spell/yi.*
-%{_mandir}/man1/rvim.1*
%{_mandir}/man1/vim.1*
-%lang(fi) %{_mandir}/fi/man1/rvim.1*
%lang(fi) %{_mandir}/fi/man1/vim.1*
-%lang(fr) %{_mandir}/fr/man1/rvim.1*
%lang(fr) %{_mandir}/fr/man1/vim.1*
%{_pixmapsdir}/vim.png
%files doc
%defattr(644,root,root,755)
-%dir %{_datadir}/vim/doc
-
# English
%{_datadir}/vim/doc/*.txt.gz
%verify(not md5 mtime size) %{_datadir}/vim/doc/tags
%lang(el) %{_datadir}/vim/tutor/README.el.cp737.txt
%lang(el) %{_datadir}/vim/tutor/README.el.txt
-%lang(bj) %{_datadir}/vim/tutor/tutor.bj
-%lang(bj) %{_datadir}/vim/tutor/tutor.bj.utf-8
+%lang(de) %{_datadir}/vim/tutor/tutor.bar
+%lang(de) %{_datadir}/vim/tutor/tutor.bar.utf-8
%lang(ca) %{_datadir}/vim/tutor/tutor.ca
%lang(ca) %{_datadir}/vim/tutor/tutor.ca.utf-8
%lang(cs) %{_datadir}/vim/tutor/tutor.cs
%lang(ja) %{_datadir}/vim/tutor/tutor.ja.utf-8
%lang(ko) %{_datadir}/vim/tutor/tutor.ko.euc
%lang(ko) %{_datadir}/vim/tutor/tutor.ko.utf-8
+%lang(nl) %{_datadir}/vim/tutor/tutor.nl
+%lang(nl) %{_datadir}/vim/tutor/tutor.nl.utf-8
%lang(nb) %{_datadir}/vim/tutor/tutor.nb
%lang(nb) %{_datadir}/vim/tutor/tutor.nb.utf-8
%lang(pl) %{_datadir}/vim/tutor/tutor.pl
%lang(tr) %{_datadir}/vim/tutor/tutor.tr.iso9
%lang(tr) %{_datadir}/vim/tutor/tutor.tr.utf-8
%lang(vi) %{_datadir}/vim/tutor/tutor.vi.utf-8
+%lang(zh_CN) %{_datadir}/vim/tutor/tutor.zh_cn.utf-8
%lang(zh_TW) %{_datadir}/vim/tutor/tutor.zh.big5
%lang(zh_TW) %{_datadir}/vim/tutor/tutor.zh.euc
%lang(zh_TW) %{_datadir}/vim/tutor/tutor.zh.utf-8
+%lang(zh_TW) %{_datadir}/vim/tutor/tutor.zh_tw.utf-8
%{_mandir}/man1/vimtutor.1*
%lang(fr) %{_mandir}/fr/man1/vimtutor.1*
%lang(it) %{_mandir}/it/man1/vimtutor.1*
+%lang(ja) %{_mandir}/ja/man1/vimtutor.1*
%lang(pl) %{_mandir}/pl/man1/vimtutor.1*
%lang(ru) %{_mandir}/ru/man1/vimtutor.1*
+%files -n vimx
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/vimx
+
%if %{with heavy}
%files heavy
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/vim.heavy
%endif
+%if %{with light}
+%files light
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/vim.light
+%endif
+
%files spell-en
%defattr(644,root,root,755)
%{_datadir}/vim/spell/en.*.*
%lang(it) %{_mandir}/it/man1/evim.1*
%lang(it) %{_mandir}/it/man1/gvi*
%lang(it) %{_mandir}/it/man1/rgv*
+%lang(ja) %{_mandir}/ja/man1/eview.1*
+%lang(ja) %{_mandir}/ja/man1/evim.1*
+%lang(ja) %{_mandir}/ja/man1/gvi*
+%lang(ja) %{_mandir}/ja/man1/rgv*
%lang(pl) %{_mandir}/pl/man1/eview.1*
%lang(pl) %{_mandir}/pl/man1/evim.1*
%lang(pl) %{_mandir}/pl/man1/gvi*