%bcond_with vim_big

# version, patch version
%define vimversion	8.2
%define vimsrcpversion	5172
%define vimpversion	5172

%define vimsubdir	vim%(echo %{vimversion} | sed -e's/\\.//')
#define vimdir		%{vimsubdir}
%define vimdir		vim-%{vimversion}.%{vimsrcpversion}

%define binprefix	/
%define x11prefix	/usr
%define vimrcloc	%{_sysconfdir}/vim
%define vimruntime	%{_datadir}/vim

%define configopts	--bindir='${exec_prefix}/bin' --disable-gpm
%define features_x11	--exec-prefix=%{_prefix} --with-x=yes --enable-gtk3-check --enable-gui=gtk3 --enable-xim --enable-fontset
%define features_nox11	--exec-prefix=%{_prefix} --with-x=no  --enable-gui=no
%define features_huge	--with-features=huge   --enable-multibyte --enable-rubyinterp --enable-pythoninterp --enable-perlinterp --enable-luainterp
%define features_big	--with-features=big    --enable-multibyte
%define features_normal	--with-features=normal --enable-multibyte
%define features_tiny	--exec-prefix=%{binprefix} --with-features=tiny --enable-multibyte --with-tlib=tinfo


Summary:        Vi IMproved - enhanced vi editor
Summary(ja):    Vi IMproved - 改良された vi エディタ
Name:           vim
%if %{vimpversion}
Version:        %{vimversion}.%{vimpversion}
%else
Version:        %{vimversion}
%endif
Release:        1%{?_dist_release}
Group:          accessories
Distribution:   Vine Linux
Vendor:         Project Vine

License:        Vim
URL:            https://www.vim.org/
Source0:        https://github.com/vim/vim/archive/v%{vimversion}.%{vimsrcpversion}.tar.gz#/vim-%{vimversion}.%{vimsrcpversion}.tar.bz2

# gvim desktop file
Source100:      gvim.desktop
Source101:      gvim16.png
Source102:      gvim32.png
Source103:      gvim48.png
Source104:      gvim64.png

Source300:      vimrc.ja
Source400:      format.vim
Source401:      verifyenc.vim

# http://trac.vinelinux.org/wiki/SpecTemplates/PlainPackage
Source500:      template.spec.vine

Patch2002:      vim-8.2-fixkeys.patch
Patch2003:      vim-8.0-specsyntax.patch

# Patches 2000 and up are patches from the base maintainer.
# If you're as lazy as me, generate the list using
# for i in seq 1 154; do printf "Patch%04d: ftp://ftp.vim.org/pub/vim/patches/8.0/8.0.%04d\n" $i $i; done > vimpatches

# nothing

Patch2010: xxd-locale.patch

Patch3007: vim-7.4-fstabsyntax.patch
Patch3010: vim-7.3-manpage-typo-668894-675480.patch
Patch3011: vim-manpagefixes-948566.patch
Patch3013: vim-7.4-globalsyntax.patch
Patch3014: vim-7.4-releasestring-1318991.patch
# migrate shebangs in script to /usr/bin/python3 and use python2 when necessary
Patch3017: vim-python3-tests.patch
# fips warning
Patch3018: vim-crypto-warning.patch

Patch4000: vim-7.2-fix-menu.patch

# Patch4010: vim-7.3-enable-syntax.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: ruby, ruby-devel, python-devel, perl, gtk3-devel, ncurses-devel, autoconf, libtool, net-tools, pixman-devel, libXt-devel
BuildRequires: lua-devel
%if "%{?_dist_release}" != "vl5"
BuildRequires: glibc-static
%endif
Requires(post): alternatives
Requires: vim-common = %{version}

%description
VIM (VIsual editor iMproved) is an updated and improved version of the
vi editor.  Vi was the first real screen-based editor for UNIX, and is
still very popular. VIM has many new features including:
multiple windows, multi-level undos, block highlighting and more.

vim-normal package provides a VIM executable configured
with essential features enabled.

%description -l ja 
VIM(VIsual editor iMproved)はviエディタ互換のエディタで,次のような多
くの機能が加えられています: マルチレベルのアンドゥ,シンタックスハイラ
イト,コマンドのヒストリ,オンラインヘルプ,ファイル名の補完,ブロック
を対象とした処理,行の折り畳み,ユニコードやその他の文字コードのサポー
トなどです.

このパッケージでは最も基本的な機能を含んだVIMが提供されます.


%package common
Summary: Common files needed by the non-X VIM packages
Summary(ja): 各種の VIM パッケージに必要なファイル
Group: accessories
Requires: gawk
Conflicts: vim-X11 < 6.0, vim-enhanced < 6.0, vim-minimal < 6.0

%description common
vim-common package contains files which every VIM binary packages will 
need in order to run. VIM itself is included in various packages (under
every different configuration) such as:

  * vim        - normal features
  * vim-big    - big features
  * vim-huge   - huge features and Ruby/Perl/Python support


%package man
Summary: Man pages for the VIM editor
Summary(ja): VIM エディタの man ページ
Group: documentation
Conflicts: nvi <= 1.79_jp-18vl1, jvim <= 3.0j2.1a-0vl1

%description man
This package contains man pages for the VIM editor.

%description -l ja man
このパッケージはVIMエディタのmanページを含んでいます.


%package tiny
Summary: A minimal version of the VIM editor
Summary(ja): 最小構成の VIM エディタ
Group: accessories
Requires(post): alternatives
Conflicts: nvi <= 1.79_jp-18vl1, jvim <= 3.0j2.1a-0vl1, vim-minimal
Obsoletes: vim-minimal

%description tiny
VIM (VIsual editor iMproved) is an updated and improved version of the
vi editor.  Vi was the first real screen-based editor for UNIX, and is
still very popular. VIM has many new features including:
multiple windows, multi-level undos, block highlighting and more.

vim-tiny package contains /bin/vi, a minimally configured version
of the VIM. It may be handy when only the root partition is present.
vim-common package is NOT needed to run this program.

%description -l ja tiny
VIM(VIsual editor iMproved)はviエディタ互換のエディタで,次のような多
くの機能が加えられています: マルチレベルのアンドゥ,シンタックスハイラ
イト,コマンドのヒストリ,オンラインヘルプ,ファイル名の補完,ブロック
を対象とした処理,行の折り畳み,ユニコードやその他の文字コードのサポー
トなどです.

このパッケージでは最小構成のVIMを/bin/vimとして提供しています。このパッ
ケージで提供されるVIMを使うにあたってはvim-commonパッケージは必要あり
ません.


%if %{with big}
%package big
Summary: VIM editor with big features
Summary(ja): 多機能版の VIM エディタ
Group: accessories
Requires(post): alternatives
Requires: vim-common = %{version}
Obsoletes: vim-color

%description big
VIM (VIsual editor iMproved) is an updated and improved version of the
vi editor.  Vi was the first real screen-based editor for UNIX, and is
still very popular. VIM has many new features including:
multiple windows, multi-level undos, block highlighting and more.

vim-big package contains the VIM with "big" features enabled.

%description -l ja big
VIM(VIsual editor iMproved)はviエディタ互換のエディタで,次のような多
くの機能が加えられています: マルチレベルのアンドゥ,シンタックスハイラ
イト,コマンドのヒストリ,オンラインヘルプ,ファイル名の補完,ブロック
を対象とした処理,行の折り畳み,ユニコードやその他の文字コードのサポー
トなどです.

このパッケージではvimパッケージで提供されるVIMよりも多くの機能を含んだ
VIMを提供しています.
%endif


%package huge
Summary: VIM editor with huge features
Summary(ja): 最大機能版の VIM エディタ
Group: accessories
Requires(post): alternatives
Requires: vim-common = %{version}
Requires: perl >= 2:5.34.0
Obsoletes: vim-color
Obsoletes: vim-ruby, vim-python, vim-perl
%if %{without big}
Obsoletes: vim-big < %{version}-%{release}
%endif

%description huge
VIM (VIsual editor iMproved) is an updated and improved version of the
vi editor.  Vi was the first real screen-based editor for UNIX, and is
still very popular. VIM has many new features including:
multiple windows, multi-level undos, block highlighting and more.

vim-huge package contains the VIM with most of its features (except
X11 features) enabled such as Ruby, Perl, Python and Lua features.

%description -l ja huge
VIM(VIsual editor iMproved)はviエディタ互換のエディタで,次のような多
くの機能が加えられています: マルチレベルのアンドゥ,シンタックスハイラ
イト,コマンドのヒストリ,オンラインヘルプ,ファイル名の補完,ブロック
を対象とした処理,行の折り畳み,ユニコードやその他の文字コードのサポー
トなどです.

このパッケージではX11対応以外のほとんどすべての機能のサポートに加え,
Ruby/Perl/Python/Luaスクリプトの実行機能までを含んでVIMを提供しています.


%package X11
Summary: VIM editor with X11 support
Summary(ja): X11 対応の VIM エディタ
Group: accessories
Requires(post): alternatives
Requires: vim-X11-common = %{version}
Provides: gvim

%description X11
VIM (VIsual editor iMproved) is an updated and improved version of the
vi editor.  Vi was the first real screen-based editor for UNIX, and is
still very popular. VIM has many new features including:
multiple windows, multi-level undos, block highlighting and more.

vim-X11 package contains the VIM with X11 features enabled:
you can run VIM as an X application with a full GUI interface and mouse
support.

%description -l ja X11
VIM(VIsual editor iMproved)はviエディタ互換のエディタで,次のような多
くの機能が加えられています: マルチレベルのアンドゥ,シンタックスハイラ
イト,コマンドのヒストリ,オンラインヘルプ,ファイル名の補完,ブロック
を対象とした処理,行の折り畳み,ユニコードやその他の文字コードのサポー
トなどです.

このパッケージでは最も基本的な構成のVIMにX11対応を加えたものを提供して
います.


%package X11-common
Summary: The common files needed by any version of the GVIM editor
Summary(ja): X11 対応 VIM エディタに必要な共通ファイル
Group: accessories
Requires: vim-common = %{version}, gtk3
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils

%description X11-common
vim-X11-common package contains files which every GVIM (VIM with X11
features enabled) binaries will need in order to run. 
GVIM itself is included in various packages (under every different
configuration) such as:

  * vim-X11 - normal features
  * vim-X11-big - big features
  * vim-X11-huge - huge features and Ruby/Perl/Python/Lua support

%description -l ja X11-common
このパッケージは以下に示す各X11対応のVIMパッケージで提供されるVIMエディ
タを実行するために必要となる共通のファイル群を提供します:

  * vim-X11      - X対応機能を有効にしたVIMパッケージ
  * vim-X11-big  - vim-bigをX対応にしたVIMパッケージ
  * vim-X11-huge - vim-hugeをX対応にしたVIMパッケージ


%if %{with big}
%package X11-big
Summary: VIM editor with big features and X11 support
Summary(ja): X11 対応の多機能版 VIM エディタ
Group: accessories
Requires(post): alternatives
Requires: vim-X11-common = %{version}
Provides: gvim

%description X11-big
VIM-X11 is a version of the VIM editor which is configured to run on the X 
Window System.  If you install this package, you can run VIM as an X
application with a full GUI interface and mouse support.

The vim-X11-big package provides the VIM which supports more features
than vim-X11 package does.

%description -l ja X11-big
VIM(VIsual editor iMproved)はviエディタ互換のエディタで,次のような多
くの機能が加えられています: マルチレベルのアンドゥ,シンタックスハイラ
イト,コマンドのヒストリ,オンラインヘルプ,ファイル名の補完,ブロック
を対象とした処理,行の折り畳み,ユニコードやその他の文字コードのサポー
トなどです.

このパッケージではvim-X11パッケージで提供されるVIMよりも,より多くの機
能を含んだVIMを提供しています.
%endif


%package X11-huge
Summary: VIM editor with huge features and X11 support
Summary(ja): X11 対応の最大機能版 VIM エディタ
Group: accessories
Requires(post): alternatives
Requires: vim-X11-common = %{version}
Requires: %(perl -le 'use Config; print $Config{archlibexp}')
Provides: gvim
%if %{without big}
Obsoletes: vim-X11-big < %{version}-%{release}
%endif

%description X11-huge
VIM-X11 is a version of the VIM editor which is configured to run on the X
Window System.  If you install this package, you can run VIM as an X
application with a full GUI interface and mouse support.

The vim-X11-huge package provides the VIM which supports much more extra
features than vim-X11-huge does, such as Ruby/Perl/Python/Lua support.

%description -l ja X11-huge
VIM(VIsual editor iMproved)はviエディタ互換のエディタで,次のような多
くの機能が加えられています: マルチレベルのアンドゥ,シンタックスハイラ
イト,コマンドのヒストリ,オンラインヘルプ,ファイル名の補完,ブロック
を対象とした処理,行の折り畳み,ユニコードやその他の文字コードのサポー
トなどです.

このパッケージではX11対応も含めたほとんどすべての機能のサポートに加え,
Ruby/Perl/Python/Luaスクリプトの実行機能までを含んでVIMを提供しています.


%debug_package


%prep
%setup -q -b 0 -n %{vimdir}
# fix rogue dependencies from sample code
chmod -x runtime/tools/mve.awk
%patch2002 -p1
%patch2003 -p1

perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk

# Base patches...
# for i in seq 1 154; do printf "%%patch%04d -p0\n" $i; done

# nothing

%patch2010 -p1

%patch3007 -p1 -b .fstabsyntax
%patch3010 -p1
%patch3011 -p1
%patch3013 -p1
#patch3014 -p1
%patch3017 -p1
%patch3018 -p1

#% patch4000 -p1
#% patch4010 -p1


%build
cd src
autoconf

sed -e "s+VIMRCLOC      = \$(VIMLOC)+VIMRCLOC   = /etc+" Makefile > Makefile.tmp
mv -f Makefile.tmp Makefile

export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2"
export CXXFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2"

make shadow
mv shadow vim-X11-huge
(cd vim-X11-huge && \
 mkdir po && (cd po && ln -s ../../po/* .) && \
 %configure %{configopts} %{features_x11} %{features_huge} && \
 make %{?_smp_mflags})

%if %{with big}
make shadow
mv shadow vim-X11-big
(cd vim-X11-big && \
 mkdir po && (cd po && ln -s ../../po/* .) && \
 %configure %{configopts} %{features_x11} %{features_big} && \
 make %{?_smp_mflags})
%endif

make shadow
mv shadow vim-X11-normal
(cd vim-X11-normal && \
 mkdir po && (cd po && ln -s ../../po/* .) && \
 %configure %{configopts} %{features_x11} %{features_normal} && \
 make %{?_smp_mflags})

make shadow
mv shadow vim-huge
(cd vim-huge && \
 mkdir po && (cd po && ln -s ../../po/* .) && \
 %configure %{configopts} %{features_nox11} %{features_huge} && \
 make %{?_smp_mflags})

%if %{with big}
make shadow
mv shadow vim-big
(cd vim-big && \
 mkdir po && (cd po && ln -s ../../po/* .) && \
 %configure %{configopts} %{features_nox11} %{features_big} && \
 make %{?_smp_mflags})
%endif

make shadow
mv shadow vim-normal
(cd vim-normal && \
 mkdir po && (cd po && ln -s ../../po/* .) && \
 %configure %{configopts} %{features_nox11} %{features_normal} && \
 make %{?_smp_mflags})

make shadow
mv shadow vim-tiny
cp os_unix.h os_unix.h.orig
sed -i -e 's|$VIM/vimrc|/etc/vimrc.tiny|g' os_unix.h
(cd vim-tiny && \
 LDFLAGS=-static export LDFLAGS; \
 %configure %{configopts} %{features_nox11} %{features_tiny} && \
 make %{?_smp_mflags})
cp os_unix.h.orig os_unix.h


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
mkdir -p %{buildroot}%{vimrcloc}
mkdir -p %{buildroot}/%{vimruntime}

ln -s %{vimrcloc}/vimrc.ja  %{buildroot}/%{vimruntime}/vimrc
ln -s %{vimrcloc}/gvimrc.ja %{buildroot}/%{vimruntime}/gvimrc
ln -s %{vimrcloc}           %{buildroot}/%{vimruntime}/vimfiles

cd src

for d in vim-normal vim-big vim-huge vim-X11-normal vim-X11-big vim-X11-huge vim-tiny
do
  if [ -d "$d" ]; then
    make -C$d DESTDIR=%{buildroot} STRIP=/bin/true installvimbin 
    vimbin=`find %{buildroot} -name vim -type f`
    mv $vimbin `dirname $vimbin`/`echo $d | sed -e's/^vim-/vim./'`
  fi
done
make -Cvim-huge     DESTDIR=%{buildroot} STRIP=/bin/true installtools installtutor
make -Cvim-X11-huge DESTDIR=%{buildroot} STRIP=/bin/true installtools installtutor installtutorbin
make -Cvim-X11-huge DESTDIR=%{buildroot} STRIP=/bin/true install-languages install-icons
make -Cvim-X11-huge DESTDIR=%{buildroot} STRIP=/bin/true installruntime installlinks installmanlinks
find %{buildroot}/%{_bindir} -type l -exec rm \{\} \;

# Dependency cleanups
chmod 644 %{buildroot}/%{_datadir}/vim/%{vimsubdir}/doc/vim2html.pl \
 %{buildroot}/%{_datadir}/vim/%{vimsubdir}/tools/*.pl \
 %{buildroot}/%{_datadir}/vim/%{vimsubdir}/tools/vim132
chmod 644 ../runtime/doc/vim2html.pl

# installing vimrc files.
install -p -m644 %{SOURCE300} %{buildroot}%{vimrcloc}/vimrc.ja
install -p -m644 %{SOURCE300} %{buildroot}%{vimrcloc}/gvimrc.ja
install -p -m644 %{SOURCE300} %{buildroot}%{_sysconfdir}/vimrc.tiny

# installing misc utils.
install -p -m644 %{SOURCE400} %{buildroot}%{_datadir}/vim/%{vimsubdir}/plugin/format.vim
install -p -m644 %{SOURCE401} %{buildroot}%{_datadir}/vim/%{vimsubdir}/plugin/verifyenc.vim

# installing template.spec
install -p -m644 %{SOURCE500} %{buildroot}%{vimrcloc}/template.spec

cd ../..

# desktop file
%__mkdir_p %{buildroot}%{_datadir}/applications
%__install -p -m644 %{SOURCE100} %{buildroot}%{_datadir}/applications/gvim.desktop

# icons
%__mkdir_p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps
%__install -p -m644 %{SOURCE101} %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/gvim.png
%__install -p -m644 %{SOURCE102} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/gvim.png
%__install -p -m644 %{SOURCE103} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/gvim.png
%__install -p -m644 %{SOURCE104} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/gvim.png

# remove international manuals
rm -rf %{buildroot}/%{_mandir}/{fr,it,ru,pl}*


%post tiny
update-alternatives \
  --install /bin/vi      vi      /bin/vim.tiny 20 \
  --slave   /usr/bin/vi  vi     /bin/vim.tiny \
  --slave   /bin/vim     vim     /bin/vim.tiny \
  --slave   /bin/eview   eview   /bin/vim.tiny \
  --slave   /bin/evim    evim    /bin/vim.tiny \
  --slave   /bin/ex      ex      /bin/vim.tiny \
  --slave   /bin/rview   rview   /bin/vim.tiny \
  --slave   /bin/rvim    rvim    /bin/vim.tiny \
  --slave   /bin/view    view    /bin/vim.tiny \
  --slave   /bin/vimdiff vimdiff /bin/vim.tiny

%triggerpostun -- vim-minimal < 6.0
update-alternatives --auto vi

%triggerpostun tiny -- vim-tiny <= 6.2.532-0vl3
update-alternatives --remove vi /bin/vim
update-alternatives --auto vi

%preun tiny
if [ "$1" = "0" ]
then
  update-alternatives --remove vi /bin/vim.tiny
fi

%post
update-alternatives \
  --install /bin/vi      vi      %{_bindir}/vim.normal 31 \
  --slave   /usr/bin/vi  vi     %{_bindir}/vim.normal \
  --slave   /bin/vim     vim     %{_bindir}/vim.normal \
  --slave   /bin/eview   eview   %{_bindir}/vim.normal \
  --slave   /bin/evim    evim    %{_bindir}/vim.normal \
  --slave   /bin/ex      ex      %{_bindir}/vim.normal \
  --slave   /bin/rview   rview   %{_bindir}/vim.normal \
  --slave   /bin/rvim    rvim    %{_bindir}/vim.normal \
  --slave   /bin/view    view    %{_bindir}/vim.normal \
  --slave   /bin/vimdiff vimdiff %{_bindir}/vim.normal

%triggerpostun -- vim <= 6.2.532-0vl3
update-alternatives --remove vim /usr/bin/vim.normal

%preun
if [ "$1" = "0" ]
then
  update-alternatives --remove vi %{_bindir}/vim.normal
fi

%if %{with big}
%post big
update-alternatives \
  --install /bin/vi      vi      %{_bindir}/vim.big 41 \
  --slave   /usr/bin/vi  vi     %{_bindir}/vim.big \
  --slave   /bin/vim     vim     %{_bindir}/vim.big \
  --slave   /bin/eview   eview   %{_bindir}/vim.big \
  --slave   /bin/evim    evim    %{_bindir}/vim.big \
  --slave   /bin/ex      ex      %{_bindir}/vim.big \
  --slave   /bin/rview   rview   %{_bindir}/vim.big \
  --slave   /bin/rvim    rvim    %{_bindir}/vim.big \
  --slave   /bin/view    view    %{_bindir}/vim.big \
  --slave   /bin/vimdiff vimdiff %{_bindir}/vim.big

%triggerpostun big -- vim-big <= 6.2.532-0vl3
update-alternatives --remove vim /usr/bin/vim.big

%preun big
if [ "$1" = "0" ]
then
  update-alternatives --remove vi %{_bindir}/vim.big
fi
%endif

%post huge
update-alternatives \
  --install /bin/vi      vi      %{_bindir}/vim.huge 51 \
  --slave   /usr/bin/vi  vi      %{_bindir}/vim.huge \
  --slave   /bin/vim     vim     %{_bindir}/vim.huge \
  --slave   /bin/eview   eview   %{_bindir}/vim.huge \
  --slave   /bin/evim    evim    %{_bindir}/vim.huge \
  --slave   /bin/ex      ex      %{_bindir}/vim.huge \
  --slave   /bin/rview   rview   %{_bindir}/vim.huge \
  --slave   /bin/rvim    rvim    %{_bindir}/vim.huge \
  --slave   /bin/view    view    %{_bindir}/vim.huge \
  --slave   /bin/vimdiff vimdiff %{_bindir}/vim.huge

%triggerpostun huge -- vim-huge <= 6.2.532-0vl3
update-alternatives --remove vim /usr/bin/vim.huge

%preun huge
if [ "$1" = "0" ]
then
  update-alternatives --remove vi %{_bindir}/vim.huge
fi

%post X11
update-alternatives \
  --install /bin/vi       vi       %{_bindir}/vim.X11-normal 30 \
  --slave   /usr/bin/vi   vi       %{_bindir}/vim.X11-normal \
  --slave   /bin/vim      vim      %{_bindir}/vim.X11-normal \
  --slave   /bin/eview    eview    %{_bindir}/vim.X11-normal \
  --slave   /bin/evim     evim     %{_bindir}/vim.X11-normal \
  --slave   /bin/ex       ex       %{_bindir}/vim.X11-normal \
  --slave   /bin/rview    rview    %{_bindir}/vim.X11-normal \
  --slave   /bin/rvim     rvim     %{_bindir}/vim.X11-normal \
  --slave   /bin/view     view     %{_bindir}/vim.X11-normal \
  --slave   /bin/vimdiff  vimdiff  %{_bindir}/vim.X11-normal
update-alternatives \
  --install %{_bindir}/gvim     gvim     %{_bindir}/vim.X11-normal 30 \
  --slave   %{_bindir}/gview    gview    %{_bindir}/vim.X11-normal \
  --slave   %{_bindir}/gvimdiff gvimdiff %{_bindir}/vim.X11-normal \
  --slave   %{_bindir}/rgview   rgview   %{_bindir}/vim.X11-normal \
  --slave   %{_bindir}/rgvim    rgvim    %{_bindir}/vim.X11-normal

%triggerpostun X11 -- vim-X11 <= 6.2.532-0vl3
update-alternatives --remove vim %{_bindir}/vim.X11-normal

%preun X11
if [ "$1" = "0" ]
then
  update-alternatives --remove vi   %{_bindir}/vim.X11-normal
  update-alternatives --remove gvim %{_bindir}/vim.X11-normal
fi

%if %{with big}
%post X11-big
update-alternatives \
  --install /bin/vi       vi       %{_bindir}/vim.X11-big 40 \
  --slave   /usr/bin/vi   vi       %{_bindir}/vim.X11-big \
  --slave   /bin/vim      vim      %{_bindir}/vim.X11-big \
  --slave   /bin/eview    eview    %{_bindir}/vim.X11-big \
  --slave   /bin/evim     evim     %{_bindir}/vim.X11-big \
  --slave   /bin/ex       ex       %{_bindir}/vim.X11-big \
  --slave   /bin/rview    rview    %{_bindir}/vim.X11-big \
  --slave   /bin/rvim     rvim     %{_bindir}/vim.X11-big \
  --slave   /bin/view     view     %{_bindir}/vim.X11-big \
  --slave   /bin/vimdiff  vimdiff  %{_bindir}/vim.X11-big
update-alternatives \
  --install %{_bindir}/gvim     gvim     %{_bindir}/vim.X11-big 40 \
  --slave   %{_bindir}/gview    gview    %{_bindir}/vim.X11-big \
  --slave   %{_bindir}/gvimdiff gvimdiff %{_bindir}/vim.X11-big \
  --slave   %{_bindir}/rgview   rgview   %{_bindir}/vim.X11-big \
  --slave   %{_bindir}/rgvim    rgvim    %{_bindir}/vim.X11-big

%triggerpostun X11-big -- vim-X11-big <= 6.2.532-0vl3
update-alternatives --remove vim %{_bindir}/vim.X11-big

%preun X11-big
if [ "$1" = "0" ]
then
  update-alternatives --remove vi   %{_bindir}/vim.X11-big
  update-alternatives --remove gvim %{_bindir}/vim.X11-big
fi
%endif

%post X11-huge
update-alternatives \
  --install /bin/vi       vi       %{_bindir}/vim.X11-huge 50 \
  --slave   /usr/bin/vi   vi       %{_bindir}/vim.X11-huge \
  --slave   /bin/vim      vim      %{_bindir}/vim.X11-huge \
  --slave   /bin/eview    eview    %{_bindir}/vim.X11-huge \
  --slave   /bin/evim     evim     %{_bindir}/vim.X11-huge \
  --slave   /bin/ex       ex       %{_bindir}/vim.X11-huge \
  --slave   /bin/rview    rview    %{_bindir}/vim.X11-huge \
  --slave   /bin/rvim     rvim     %{_bindir}/vim.X11-huge \
  --slave   /bin/view     view     %{_bindir}/vim.X11-huge \
  --slave   /bin/vimdiff  vimdiff  %{_bindir}/vim.X11-huge
update-alternatives \
  --install %{_bindir}/gvim     gvim     %{_bindir}/vim.X11-huge 50 \
  --slave   %{_bindir}/gview    gview    %{_bindir}/vim.X11-huge \
  --slave   %{_bindir}/gvimdiff gvimdiff %{_bindir}/vim.X11-huge \
  --slave   %{_bindir}/rgview   rgview   %{_bindir}/vim.X11-huge \
  --slave   %{_bindir}/rgvim    rgvim    %{_bindir}/vim.X11-huge

%triggerpostun X11-huge -- vim-X11-huge <= 6.2.532-0vl3
update-alternatives --remove vim %{_bindir}/vim.X11-huge

%preun X11-huge
if [ "$1" = "0" ]
then
  update-alternatives --remove vi   %{_bindir}/vim.X11-huge
  update-alternatives --remove gvim %{_bindir}/vim.X11-huge
fi


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%{_bindir}/vim.normal

%files common
%defattr(-,root,root)
%license LICENSE
%doc README*
%{vimrcloc}
%{_bindir}/vimtutor
%{_bindir}/xxd
%{_datadir}/vim

%files man
%defattr(-,root,root)
%{_mandir}/man1/eview.1*
%{_mandir}/man1/evim.1*
%{_mandir}/man1/ex.1*
%{_mandir}/man1/rgview.1*
%{_mandir}/man1/rgvim.1*
%{_mandir}/man1/rview.1*
%{_mandir}/man1/rvim.1*
%{_mandir}/man1/view.1*
%{_mandir}/man1/vim.1*
%{_mandir}/man1/vimdiff.1*
%{_mandir}/man1/vimtutor.1*
%{_mandir}/man1/xxd.1*
%{_mandir}/ja/man1/eview.1.gz
%{_mandir}/ja/man1/evim.1.gz
%{_mandir}/ja/man1/ex.1.gz
%{_mandir}/ja/man1/gview.1.gz
%{_mandir}/ja/man1/gvim.1.gz
%{_mandir}/ja/man1/gvimdiff.1.gz
%{_mandir}/ja/man1/rgview.1.gz
%{_mandir}/ja/man1/rgvim.1.gz
%{_mandir}/ja/man1/rview.1.gz
%{_mandir}/ja/man1/rvim.1.gz
%{_mandir}/ja/man1/view.1.gz
%{_mandir}/ja/man1/vim.1.gz
%{_mandir}/ja/man1/vimdiff.1.gz
%{_mandir}/ja/man1/vimtutor.1.gz
%{_mandir}/ja/man1/xxd.1.gz
%dir %{_mandir}/da.ISO8859-1
%dir %{_mandir}/da.ISO8859-1/man*
%{_mandir}/da.ISO8859-1/man*/*
%dir %{_mandir}/da.UTF-8
%dir %{_mandir}/da.UTF-8/man*
%{_mandir}/da.UTF-8/man*/*
%dir %{_mandir}/de.ISO8859-1
%dir %{_mandir}/de.ISO8859-1/man*
%{_mandir}/de.ISO8859-1/man*/*
%dir %{_mandir}/de.UTF-8
%dir %{_mandir}/de.UTF-8/man*
%{_mandir}/de.UTF-8/man*/*
%dir %{_mandir}/tr.ISO8859-9
%dir %{_mandir}/tr.ISO8859-9/man*
%{_mandir}/tr.ISO8859-9/man*/*
%dir %{_mandir}/tr.UTF-8
%dir %{_mandir}/tr.UTF-8/man*
%{_mandir}/tr.UTF-8/man*/*

%exclude %{_mandir}/da
%exclude %{_mandir}/de
%exclude %{_mandir}/tr

%files X11-common
%defattr(-,root,root)
%config(missingok) %{_datadir}/applications/gvim.desktop
%config(missingok) %{_datadir}/applications/vim.desktop
%{_datadir}/icons/hicolor/*/apps/gvim.png
%{_datadir}/icons/locolor/*/apps/gvim.png
%{_mandir}/man1/gview.1*
%{_mandir}/man1/gvim.1*
%{_mandir}/man1/gvimdiff.1*

%files tiny
%defattr(-,root,root)
%{binprefix}bin/vim.tiny
%{_sysconfdir}/vimrc.tiny

%if %{with big}
%files big
%defattr(-,root,root)
%{_bindir}/vim.big
%endif

%files huge
%defattr(-,root,root)
%{_bindir}/vim.huge

%files X11
%defattr(-,root,root)
%{_bindir}/vim.X11-normal

%if %{with big}
%files X11-big
%defattr(-,root,root)
%{_bindir}/vim.X11-big
%endif

%files X11-huge
%defattr(-,root,root)
%{_bindir}/vim.X11-huge


%changelog
* Wed Jun 29 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.5172-1
- new upstream release.

* Sat Jun 18 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.5115-1
- new upstream release.

* Thu Jun 09 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.5069-1
- new upstream release.

* Fri May 27 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.5024-1
- new upstream release.

* Tue May 17 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4969-1
- new upstream release.

* Thu Apr 28 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4833-1
- new upstream release.

* Thu Apr 14 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4747-1
- new upstream release.

* Sun Mar 27 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4632-1
- new upstream release.

* Wed Feb 23 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4451-1
- new upstream release.

* Wed Feb 09 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4333-1
- new upstream release.

* Thu Feb 03 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4285-1
- new upstream release.
- updated Patch2002.

* Wed Jan 26 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4217-1
- new upstream release.

* Fri Jan 14 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4087-1
- new upstream release.

* Sat Jan 08 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4036-1
- new upstream release.

* Wed Jan 05 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.4005-1
- new upstream release.

* Wed Dec 08 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3756-1
- new upstream release.

* Sat Dec 04 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3732-1
- new upstream release.

* Fri Nov 19 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3617-1
- new upstream release.
- built with perl-5.34.0.

* Mon Nov 15 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3595-1
- new upstream release.
- rebuilt with ruby-3.0.2.

* Tue Nov 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3582-1
- new upstream release.

* Wed Nov 03 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3570-1
- new upstream release.

* Thu Oct 21 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3547-1
- new upstream release.

* Tue Sep 28 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3458-1
- new upstream release.
- dropped Patch3000, 3002, 3004, 3008 and 3016.

* Fri Sep 10 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3423-1
- new upstream release.

* Wed Aug 18 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3356-1
- new upstream release.
- disabled vim-{,X11-}big.
- dropped update-desktop-database scriptlets.

* Thu Aug 05 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.3290-1
- new upstream release.

* Mon Feb 15 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.2517-1
- new upstream release.
- updated Patch3016.

* Mon Sep 21 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.1712-1
- new upstream release.
- updated Patch3007 and 3017.

* Mon Mar 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.0390-1
- new upstream release.
- built with ruby-2.6.5.

* Mon Mar 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 8.2.0365-1
- new upstream release.
- updated fedora patches.
- updated .spec template for Vine Linux.
- switched gui to gtk3.

* Mon May 20 2019 Toshiaki Ara <ara_t@384.jp> 8.0.599-2
- rebuild with perl-5.26

* Fri May 19 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 8.0.599-1
- update to 8.0.599
- update spec plugin patches (Patch3006, Patch3011)

* Sat Apr  8 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 7.4.589-5
- build with ruby 2.4.1

* Tue Nov 29 2016 Toshiaki Ara <ara_t@384.jp> 7.4.589-4
- fix %%post error when installing vim-huge, vim-X11 and vi-X11-huge
  - change /usr/bin/vi to /usr/bin/vi

* Mon Nov 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.4.589-3
- add Source500 (template.spec.vine)

* Fri Sep 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.4.589-2
- rebuild with ruby-2.2.3

* Sat Jan 31 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 7.4.589-1
- update to 7.4.589

* Thu Jul 03 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.4.334-3
- rebuild with perl-5.16.3

* Wed Jun 25 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 7.4.334-2vl7
- build with Ruby 2.1

* Thu Jun 19 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 7.4.334-1
- update to 7.4.334

* Sun Dec 22 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 7.4.131-1
- update to 7.4.131

* Sat Nov 30 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 7.4.110-1
- update to 7.4.110
 - add 7.4 patches (Patch51..110)
- enable Lua support
- fix 7.4.50-1 changelog

* Fri Oct  4 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 7.4.50-1
- update to 7.4.50
 - drop 7.3 patches (Patch001..712)
 - add 7.4 patches (Patch1..50)
- drop crv patch (Patch2004)
- update some patches from Fedora vim-7.4.027-2
 - syntax patch (Patch3000): 
 - fstabsyntax patch (Patch3007)
- add Distribution and Vendor tags

* Thu Oct 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 7.3.712-1
- update to 7.3.712
- build with ruby-1.9.3

* Sun Jun 05 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 7.3.206-1
- update to 7.3.206

* Thu Apr 07 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 7.3.154-1
- update to 7.3.154
  - update Patch001-154

* Tue Mar 29 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 7.2.446-5
- rebuild with perl-5.12.3

* Sun Jan 09 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.2.446-4
- add BuildRequires: libXt-devel

* Sun Jan 09 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 7.2.446-3
- update vimrc.ja (fixed http://bts.vinelinux.org/user.cgi?action=view_report&id=1067&project=VineLinux)

* Sun Sep 19 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 7.2.446-2
- do not BR: glibc-static on Vine 5.x

* Sun Sep 19 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 7.2.446-1
- update tp 7.2.446 (add Patch149-446)
- run update-alternatives on vim-huge post script
- drop Patch3004 (use %%{_datadir}/vim/vimrc)
- add vimrc.tiny for vim.tiny
- add BR: glibc-static to build vime-tiny

* Sat Mar 20 2010 Shu KONNO <owa@bg.wakwak.com> 7.2.148-2
- rebuilt with python-2.6

* Sun Apr 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 7.2.148-1
- new upstream release
- modified vimrc.ja to support utf-8 locale
- drop vim-{ruby,perl,python}

* Mon May 05 2008 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 6.4.10-1vl5
- rebuild with perl-5.10.0
- applied new versioning policy
- add "make installghelplinks"
- add BuildRequires: pixman-devel

* Wed Sep 05 2007 KAZUKI SHIMURA <ksh753@y5.dion.ne.jp> 6.4.10-0vl3
- [SECURITY] add helptags.patch (patch2000) renamed from 7.1.039
  - fix format string vulnerability in the helptags_one (CVE-2007-2953)

* Sat Jul 28 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 6.4.10-0vl2
- changed man Group to Applications/Documentation

* Mon May 15 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.4.10-0vl1
- new upstream patch version

* Tue Feb 28 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.4.8-0vl2
- update patching script
  - exit if upstream patches not exist

* Mon Feb 27 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.4.8-0vl1
- new upstream patch version

* Fri Nov 04 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.4-0vl2
- add cssIdentifier.patch to avoid error

* Mon Oct 31 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.4-0vl1
- new upstream release
- drop tmpfile.patch
- import verifyenc.vim from KaoriYa.net ([vine-users:073279])
  - http://www.kaoriya.net/dist/vim-6.4-w32j.tar.bz2
- import checkhl.patch from FC 6.4.000-2

  * Tue Oct 25 2005 Karsten Hopp <karsten@redhat.de> 6.4.000-2
  - add syntax highlighting rule for %%check (Ralf Ertzinger, #165277)

* Mon Oct 17 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.3.90-0vl1
- new upstream patch version
- add numeric-keypad.patch (patch101)
  - Thanks, ISOBE Takeshi

* Sun Aug 14 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.3.86-0vl2
- [SECURITY] re-add patches, import tmpfile.patch from FC
  - oops, patches not added at 6.3.86-0vl1
  - overwrite or create arbitrary files via a symlink attack (CAN-2005-0069)

* Sat Jul 30 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.3.86-0vl1
- [SECURITY] new upstream patch version
  - modelines shell command execution vulnerability (CAN-2005-2368)
- add README_patches.txt

* Sun May 15 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.3.71-0vl1
- new upstream patch version
- update desktop file
  - import icons from FC
  - import gvim.desktop from FC and modify
  - move gvim.desktop to %%{_datadir}/applications
  - run update-desktop-database at X11-common's post/postun
- import specsyntax.patch from FC

* Wed Jan 26 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.3.58-0vl1
- new upstream patch version
- perl/huge/X11-huge
  - add Requires: %%(perl -le 'use Config; print $Config{archlibexp}')

* Tue Jan 11 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.3.53-0vl2
- rebuild with perl-5.8.6

* Mon Dec 27 2004 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.3.53-0vl1
- [SECURITY] new upstream patch version
  - arbitrary command execution vulnerability (CAN-2004-1138)
- add URL
- fix common's Japanese description
  - remove package information about vim-X11-*
- add Provides: gvim (vim-X11-*)

* Fri Oct 29 2004 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 6.3.31-0vl1
- new upstream patch version
- fix URLs (source1,2)

* Sun Jun 20 2004 Tomoya TAKA <taka@vinelinux.org> 6.3.6-0vl1
- new upstream release
- update configurations of alternatives
- vim-tiny contains /bin/vim.tiny only
- remove 'Requires: vim-common' from vim-man subpackage
- change order of fileencordings in vimrc.ja

* Wed May 19 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 6.2.532-0vl3
- use gtk2 instead of gtk+
- add Requires: gtk2 to vim-X11-common
- add BuildRequires: gtk2-devel

* Tue May 18 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 6.2.532-0vl2
- add --enable-multibyte to vim-tiny

* Sat May 15 2004 Tomoya TAKA <taka@vinelinux.org> 6.2.532-0vl1
- new upstream patch version

* Sat Mar 20 2004 Tomoya TAKA <taka@vinelinux.org> 6.2.382-0vl1
- new upstream version

* Mon Oct 06 2003 akira yamada <akira@vinelinux.org> 6.2.106-0vl1
- new upstream version
- bulid with ruby-1.8.0.

* Tue Jun 17 2003 UECHI Yasumasa <uh@u.dhis.portside.net> 6.2.14-0vl1
- new upstream version

* Wed Jan 22 2003 Tomoya TAKA <taka@vinelinux.org> 6.1.300-0vl1
- new upstream patch version

* Wed Jan 22 2003 Tomoya TAKA <taka@vinelinux.org> 6.1.265-0vl1
- patch level 265, including fix of modeline vulnerability
  cf. http://www.guninski.com/vim1.html

* Wed Apr 03 2002 akira yamada <akira@vinelinux.org> 6.1.5-0vl1
- new upstream version.
- updated format.vim. (extracted from
  http://www.kaoriya.net/dist/gvim-6.1-w32j.tar.bz2.)
- clean uped vimrc, vimrc.ja, gvimrc, gvimrc.ja.

* Thu Jan 31 2002 Toru Sagami <sagami@vinelinux.org> 6.0.158-0vl1
- patch level 6.0.158

* Sun Nov 25 2001 akira yamada <akira@vinelinux.org> 6.0.93-0vl1
- new upstream patch version.
- added PreReqs: alternatives for vim, vim-tiny, vim-X11.

* Mon Nov 12 2001 akira yamada <akira@vinelinux.org> 6.0.68-0vl4
- added Japanese descriptions.
- English descriptions by shaolin.

* Wed Nov 07 2001 akira yamada <akira@vinelinux.org> 6.0.68-0vl3
- added triggerpostun for vim-minimal.

* Mon Nov 05 2001 akira yamada <akira@vinelinux.org> 6.0.68-0vl2
- patch #44, #54, #64 is now available.

* Mon Nov 05 2001 akira yamada <akira@vinelinux.org> 6.0.68-0vl1
- new upstream patch version.
- removed jcode2.vim and added new default vimrc.
- removed unused sources and patches.
- alternatives for /bin/vi.
- added net-tools to BuildRequires. (/bin/hostname)

* Wed Oct 31 2001 akira yamada <akira@vinelinux.org> 6.0.43-0vl1
- new upstream patch version.
- added vim-lang and vim-extra.
- added gawk to Requires of vim-common.
- added gtk+ to Requires of vim-X11-common.

* Wed Oct 17 2001 akira yamada <akira@vinelinux.org> 6.0.11-0vl2
- added autoconf and libtool to BuildRequires.

* Mon Oct 15 2001 akira yamada <akira@vinelinux.org> 6.0.11-0vl1
- vim and vim-X11 is no longer virturl package.
- obsoleted vim-normal and vim-X11-normal.
- added check "$1" = "0" for  preun scripts.

* Mon Oct 15 2001 akira yamada <akira@vinelinux.org> 6.0-0vl2
- linked staticly vim of vim-tiny.

* Sun Oct 14 2001 akira yamada <akira@vinelinux.org> 6.0-0vl1
- new upstream version.
- now, vim and vim-X11 is virtual package.
- new sub-packages vim-tiny, vim-normal, vim-big, vim-ruby, vim-perl,
  vim-python, vim-huge, vim-X11-normal, vim-X11-big and vim-X11-huge.
- obsoleted vim-minimal and vin-enhanced.

* Sat Sep 08 2001 Toru Sagami <sagami@vinelinux.org>
- 5.8-0vl4: rebuilt on current ncurses
- added format.vim and more useful comments in vimrc.ja

* Sat Aug 04 2001 <sagami@vinelinux.org>
- 5.8-0vl3: patch level 5.8.9
- dont pack duplicated runtime/syntax directory into %%doc

* Thu Jul 19 2001 <sagami@vinelinux.org>
- 5.8-0vl2: patch level 5.8.7
- Add postfix config syntax highlighting

* Fri Jun 08 2001 <sagami@vinelinux.org>
- vim-5.8-0vl1: patch level 5.8.002

* Fri Jun 01 2001 <sagami@vinelinux.org>
- vim-5.8-0vl0: vim-5.8 bug fix release

* Thu May 10 2001 <sagami@vinelinux.org>
- vim-5.7-0vl8: patch level 5.7.030
- use versioned sources, not older ones and patches
- sync with RH6.2 updates

* Wed Apr 18 2001 sagami@vinelinux.org
- jcode2.vim: fix back to original one
- patch level 5.7.028

* Mon Feb 05 2001 Toru Sagami <czs14350@mb.infoweb.ne.jp>
- patch level 5.7.024
- small fix for jcode2.vim
- split man package from common package to avoid conflict with jvim3

* Tue Dec 26 2000 Toru Sagami <czs14350@mb.infoweb.ne.jp>
- %%{makeinstall}
- acutally build against current ncurses5 without gpm with ncurses4

* Thu Dec 21 2000 Toru Sagami <czs14350@mb.infoweb.ne.jp>
- build against current ncurses5
- added CVS commit filetype detection to scripts.vim

* Wed Dec 06 2000 Toru Sagami <czs14350@mb.infoweb.ne.jp>
- 5.7.19
- jcode.pl-2.13
- added License recognition to .spec syntax
- added RFC822 mail/ emacs-lips filetype detection to scripts.vim
- FHS stuff: _mandir

* Wed Jul 19 2000 Toru Sagami <czs14350@mb.infoweb.ne.jp>
- based on RH 5.6-14 ->  5.7 (patchlevel .2)
- manpath: /usr/share/man -> /usr/man/man :-)
- delete %%makeinstall macro for rpm-3.0.x
- gvim: --enable-multibyte, xim, fontset
- vim: --enable-multibyte
- jcode.pl-2.11 and jcode2.vim from Nozomu Kobayashi's rpm package
- vimrc: added bzip2 and Japanese stuff of a kind

* Sat Jun  3 2000 Bernhard Rosenkr舅zer <bero@redhat.com>
- patchlevel 74
- add %%makeinstall macro recognition to .spec file syntax highlighting rules
- fix up Makefiles

* Fri Apr 14 2000 Bernhard Rosenkr舅zer <bero@redhat.com>
- patchlevel 66
- fix compilation with perl 5.6.0

* Mon Mar 20 2000 Bernhard Rosenkr舅zer <bero@redhat.com>
- patchlevel 12

* Tue Mar 07 2000 Preston Brown <pbrown@redhat.com>
- fix home/end in vimrc (we did a term = rxvt, totally wrong)

* Tue Feb 29 2000 Preston Brown <pbrown@redhat.com>
- change F1-F4 keybindings for xterm builtin terminfo to match real terminfo

* Thu Feb 17 2000 Bill Nottingham <notting@redhat.com>
- kill autoindent

* Mon Feb 07 2000 Preston Brown <pbrown@redhat.com>
- wmconfig -> desktop

* Sat Feb  5 2000 Bernhard Rosenkr舅zer <bero@redhat.com>
- Patchlevel 11
- handle compressed man pages
- fix man page symlinks

* Wed Feb  2 2000 Bill Nottingham <notting@redhat.com>
- eliminate dependencies on X in vim-enhanced, and ncurses/gpm
  in vim-minimal

* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com>
- eliminate dependencies on csh and perl in vim-common

* Wed Jan 19 2000 Bernhard Rosenrk舅zer <bero@redhat.com>
- Use awk, not nawk

* Tue Jan 18 2000 Bernhard Rosenrk舅zer <bero@redhat.com>
- 5.6
- patch 5.6.001
- remove /usr/bin/vi - if you want vim, type vim

* Tue Jan 11 2000 Bernhard Rosenkr舅zer <bero@redhat.com>
- 5.6a
- Remove dependency on nawk (introduced by base update)
- some tweaks to make updating easier

* Tue Nov  9 1999 Bernhard Rosenkr舅zer <bero@redhat.com>
- 5.5
- fix path to vimrc

* Tue Jul 27 1999 Michael K. Johnson <johnsonm@redhat.com>
- moved from athena to gtk widgets for X version
- removed vim.1 from X11 filelist because X11 depends on vim-common anyway
- fixed rogue dependencies from sample files

* Tue Jul 27 1999 Jeff Johnson <jbj@redhat.com>
- update to 5.4.

* Thu Jul 22 1999 Jeff Johnson <jbj@redhat.com>
- man page had buildroot pollution (#3629).

* Thu Mar 25 1999 Preston Brown <pbrown@redhat.com>
- with recent termcap/terminfo fixes, regular vim works in xterm/console
- in color, so vim-color package removed.

* Tue Mar 23 1999 Erik Troan <ewt@redhat.com>
- removed "set backupdir=/tmp/vim_backup" from default vimrc

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 5)

* Thu Dec 17 1998 Michael Maher <mike@redaht.com>
- built pacakge for 6.0

* Tue Sep 15 1998 Michael Maher <mike@redhat.com>
- removed '--with-tlib=termcap' so that color-vim works

* Wed Sep  2 1998 Jeff Johnson <jbj@redhat.com>
- update to 5.3.

* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com>
- merge in Toshio's changes
- color-vim: changed "--disable-p" to "--disable-perlinterp --with-tlib=termcap"
- added minimal rvi/rview and man pages.
- move Obsoletes to same package as executable.

* Thu Aug 06 1998 Toshio Kuratomi <badger@prtr-13.ucsc.edu>
- Break the package apart similar to the way the netscape package was
  broken down to handle navigator or communicator: The vim package is
  Obsolete, now there is vim-common with all the common files, and a
  package for each binary: vim-minimal (has /bin/vi compiled with no
  frills), vim-enhanced (has /usr/bin/vim with extra perl and python
  interpreters), and vim-X11 (has /usr/X11R6/bin/gvim compiled with
  GUI support.)
- Enable the perl and python interpreters in the gui version (gvim).

* Tue Jun 30 1998 Michael Maher <mike@redhat.com>
- Fixed tutor help.
- cvim package added.  Thanks to Stevie Wills for finding this one :-)

* Thu May 07 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Fri May 01 1998 Donnie Barnes <djb@redhat.com>
- added patch to turn off the "vi compatibility" by default.  You can
  still get it via the -C command line option

* Thu Apr 23 1998 Donnie Barnes <djb@redhat.com>
- removed perl and python interpreters (sorry, but those don't belong
  in a /bin/vi and having two vi's seemed like overkill...complain
  to suggest@redhat.com if you care)

* Fri Apr 17 1998 Donnie Barnes <djb@redhat.com>
- fixed buildroot bug

* Sat Apr 11 1998 Donnie Barnes <djb@redhat.com>
- updated from 4.6 to 5.1
- moved to buildroot

* Sun Nov 09 1997 Donnie Barnes <djb@redhat.com>
- fixed missing man page

* Wed Oct 22 1997 Donnie Barnes <djb@redhat.com>
- added wmconfig entry to vim-X11

* Mon Oct 20 1997 Donnie Barnes <djb@redhat.com>
- upgraded from 4.5 to 4.6

* Fri Jun 13 1997 Erik Troan <ewt@redhat.com>
- built against glibc

* Tue Mar 25 1997 Michael K. Johnson <johnsonm@redhat.com>
- Upgraded to 4.5
- Added ex symlinks

* Tue Mar 11 1997 Michael K. Johnson <johnsonm@redhat.com>

- Added view symlink.