- Overhaul vim.spec
* Remove (g)vim-{base, enchanced} subpackages * Dynamically load Python, Ruby, TCL so we can support all of them without different subpackages. * Python3 support (bnc#817774). * LUA support. * Disable TCL as it cannot be linked dynamically. OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=152
This commit is contained in:
parent
a86d88d8cd
commit
c93a2d000a
11
vim.changes
11
vim.changes
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 16 12:08:44 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Overhaul vim.spec
|
||||
* Remove (g)vim-{base, enchanced} subpackages
|
||||
* Dynamically load Python, Ruby, TCL so we can support
|
||||
all of them without different subpackages.
|
||||
* Python3 support (bnc#817774).
|
||||
* LUA support.
|
||||
* Disable TCL as it cannot be linked dynamically.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 12 06:35:53 UTC 2013 - idonmez@suse.com
|
||||
|
||||
|
297
vim.spec
297
vim.spec
@ -20,6 +20,7 @@
|
||||
#%define official_ptchlvl 0
|
||||
%define VIM_SUBDIR vim74
|
||||
%define site_runtimepath /usr/share/vim/site
|
||||
%define make make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/current MAKE="make -e" %{?_smp_mflags}
|
||||
|
||||
Name: vim
|
||||
#Version: 7.4.%{official_ptchlvl}
|
||||
@ -37,14 +38,14 @@ BuildRequires: pkgconfig(xt)
|
||||
%endif
|
||||
BuildRequires: krb5-mini
|
||||
BuildRequires: libacl-devel
|
||||
BuildRequires: lua-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: perl
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: ruby-devel
|
||||
BuildRequires: systemd
|
||||
BuildRequires: tcl-devel
|
||||
BuildRequires: update-alternatives
|
||||
BuildRequires: update-desktop-files
|
||||
#
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -54,27 +55,20 @@ BuildRequires: gpm-devel
|
||||
BuildRequires: gpm
|
||||
%endif
|
||||
#
|
||||
%define make make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/current MAKE="make -e" %{?jobs:-j%jobs}
|
||||
#
|
||||
%define vim_prereq %{name}-base = %{version}
|
||||
# Explicitly require versioned perl for libperl.so
|
||||
%define perl_requires perl = %(rpm -q --qf '%{VERSION}' perl)
|
||||
%if 0%{?with_splitted_gvim}
|
||||
%define gvim_prereq g%{name}-base = %{version}
|
||||
%else
|
||||
%define gvim_prereq %{vim_prereq}
|
||||
%endif
|
||||
PreReq: %{vim_prereq}
|
||||
#
|
||||
PreReq: fileutils
|
||||
PreReq: sh-utils
|
||||
PreReq: update-alternatives
|
||||
#
|
||||
Provides: vi
|
||||
Provides: vim-base = %{version}-%{release}
|
||||
Provides: vim-enhanced = %{version}-%{release}
|
||||
Provides: vim-python = %{version}-%{release}
|
||||
Conflicts: vim-base < %{version}-%{release}
|
||||
Conflicts: vim-enhanced < %{version}-%{release}
|
||||
Conflicts: vim-python < %{version}-%{release}
|
||||
Provides: vim_client
|
||||
#
|
||||
%if 0%{?suse_version} >= 1010
|
||||
Recommends: vim-data = %{version}
|
||||
Recommends: vim-data = %{version}-%{release}
|
||||
%endif
|
||||
Summary: Vi IMproved
|
||||
License: SUSE-Vim
|
||||
@ -112,6 +106,7 @@ Patch21: %{name}-7.3-filetype_changes.patch
|
||||
Patch22: %{name}-7.4-filetype_mine.patch
|
||||
Patch100: vim-7.1.314-CVE-2009-0316-debian.patch
|
||||
Patch101: vim73-no-static-libpython.patch
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
Vim (Vi IMproved) is an almost compatible version of the UNIX editor
|
||||
@ -125,13 +120,9 @@ of UNIX.
|
||||
|
||||
For SUSE Linux, Vim is used as /usr/bin/vi.
|
||||
|
||||
Package vim contains the normal version of vim. To get the full runtime
|
||||
environment install additionally vim-data.
|
||||
|
||||
%package data
|
||||
Summary: Vi IMproved
|
||||
Group: Productivity/Editors/Vi
|
||||
PreReq: %{vim_prereq}
|
||||
%if 0%{?suse_version} >= 1120
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
@ -153,105 +144,19 @@ For SUSE Linux, Vim is used as /usr/bin/vi.
|
||||
|
||||
Package vim-data contains the runtime files.
|
||||
|
||||
%package base
|
||||
Summary: Vi IMproved
|
||||
Group: Productivity/Editors/Vi
|
||||
PreReq: %{vim_prereq}
|
||||
PreReq: update-alternatives
|
||||
|
||||
%description base
|
||||
Vim (Vi IMproved) is an almost compatible version of the UNIX editor
|
||||
vi. Almost every possible command can be performed using only ASCII
|
||||
characters. Only the 'Q' command is missing (you do not need it). Many
|
||||
new features have been added: multilevel undo, command line history,
|
||||
file name completion, block operations, and editing of binary data.
|
||||
|
||||
Vi is available for the AMIGA, MS-DOS, Windows NT, and various versions
|
||||
of UNIX.
|
||||
|
||||
For SUSE Linux, Vim is used as /usr/bin/vi.
|
||||
|
||||
Package vim-base contains the common files needed for all different vim
|
||||
versions. You still need to select at least one of the vim,
|
||||
vim-enhanced or gvim packages. For full runtime support you might also
|
||||
want to install the vim-data package.
|
||||
|
||||
%package enhanced
|
||||
Summary: A version of the VIM editor which includes recent enhancements
|
||||
Group: Productivity/Editors/Vi
|
||||
PreReq: %{vim_prereq}
|
||||
PreReq: update-alternatives
|
||||
Requires: %{perl_requires}
|
||||
Provides: vi
|
||||
Provides: vim_client
|
||||
|
||||
%description enhanced
|
||||
The vim-enhanced package contains a version of VIM with extra, recently
|
||||
introduced features like Ruby, Perl and TCL interpreters, but it has no
|
||||
graphical user interface. Please use gvim instead, if you need a gui
|
||||
too.
|
||||
|
||||
Install the vim-enhanced package if you'd like to use a version of the
|
||||
VIM editor which includes recently added enhancements like interpreters
|
||||
for the Python and Perl scripting languages. You'll also need to
|
||||
install the base package 'vim', for online help, etc. If you need the
|
||||
graphical features of vim, you might want to install package gvim too.
|
||||
|
||||
%package python
|
||||
Summary: A version of the VIM editor which includes recent enhancements
|
||||
Group: Productivity/Editors/Vi
|
||||
PreReq: %{vim_prereq}
|
||||
PreReq: update-alternatives
|
||||
Provides: vi
|
||||
Provides: vim_client
|
||||
|
||||
%description python
|
||||
The vim-python package contains a version of VIM with extra, recently
|
||||
introduced features like Python and X11 clipboard support, but it has no
|
||||
graphical user interface.
|
||||
|
||||
Install the vim-python package if you'd like to use these features but don't
|
||||
want to have the extra dependencies on Perl, Ruby and TCL runtimes. You'll also
|
||||
need to install the base package 'vim', for online help, etc. If you need the
|
||||
graphical features of vim, you might want to install package gvim too.
|
||||
|
||||
%if 0%{?with_splitted_gvim}
|
||||
%package -n gvim-base
|
||||
Summary: dummy package for a subpackage only build in the buildservice
|
||||
Group: Productivity/Editors/Vi
|
||||
PreReq: %{vim_prereq}
|
||||
PreReq: update-alternatives
|
||||
Requires: gvim_client
|
||||
|
||||
%description -n gvim-base
|
||||
dummy package for a subpackage only build in the buildservice
|
||||
|
||||
%package -n gvim-enhanced
|
||||
Summary: dummy package for a subpackage only build in the buildservice
|
||||
Group: Productivity/Editors/Vi
|
||||
PreReq: %{gvim_prereq}
|
||||
PreReq: update-alternatives
|
||||
Provides: gvim_client
|
||||
Provides: vi
|
||||
Provides: vim_client
|
||||
|
||||
%description -n gvim-enhanced
|
||||
dummy package for a subpackage only build in the buildservice
|
||||
%endif
|
||||
|
||||
%package -n gvim
|
||||
Summary: A GUI for Vi
|
||||
Group: Productivity/Editors/Vi
|
||||
PreReq: %{gvim_prereq}
|
||||
PreReq: update-alternatives
|
||||
Requires: %{perl_requires}
|
||||
Requires: gvim_client
|
||||
Requires: vim-data
|
||||
Provides: gvim-base = %{version}
|
||||
Provides: gvim-enhanced = %{version}
|
||||
Provides: gvim-base = %{version}-%{release}
|
||||
Provides: gvim-enhanced = %{version}-%{release}
|
||||
Conflicts: gvim-base < %{version}-%{release}
|
||||
Conflicts: gvim-enhanced < %{version}-%{release}
|
||||
Provides: gvim_client
|
||||
Provides: vi
|
||||
Provides: vim_client
|
||||
%{perl_requires}
|
||||
|
||||
%description -n gvim
|
||||
Copy and modify /usr/share/vim/current/gvimrc to ~/.gvimrc if needed.
|
||||
@ -259,8 +164,7 @@ Copy and modify /usr/share/vim/current/gvimrc to ~/.gvimrc if needed.
|
||||
Package gvim contains the largest set of features of vim, which is
|
||||
graphical windows and language interpreter, like python, ruby, or perl.
|
||||
You need package vim for the help and other documentation too. If you
|
||||
want less features, you might want to install packages vim-enhanced or
|
||||
vim instead.
|
||||
want less features, you might want to install vim instead.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{VIM_SUBDIR}
|
||||
@ -313,17 +217,13 @@ export COMMON_OPTIONS="\
|
||||
%else
|
||||
--with-tlib=ncurses \
|
||||
%endif
|
||||
--with-global-runtime=%{site_runtimepath}"
|
||||
export SCRIPT_OPTIONS="\
|
||||
--enable-perlinterp \
|
||||
--enable-pythoninterp \
|
||||
--enable-rubyinterp \
|
||||
--enable-tclinterp \
|
||||
--with-tclsh=%{_bindir}/tclsh \
|
||||
--with-python-config-dir=%{py_libdir}/config"
|
||||
export PYTHON_OPTIONS="\
|
||||
--enable-pythoninterp \
|
||||
--with-python-config-dir=%{py_libdir}/config"
|
||||
--with-global-runtime=%{site_runtimepath} \
|
||||
--enable-luainterp=dynamic \
|
||||
--enable-perlinterp=dynamic \
|
||||
--enable-pythoninterp=dynamic \
|
||||
--enable-python3interp=dynamic \
|
||||
--enable-rubyinterp=dynamic"
|
||||
|
||||
export GUI_OPTIONS="\
|
||||
--enable-xim \
|
||||
--enable-fontset \
|
||||
@ -331,46 +231,21 @@ export GUI_OPTIONS="\
|
||||
--enable-gtk2-check"
|
||||
|
||||
pushd src
|
||||
autoconf
|
||||
autoconf
|
||||
popd
|
||||
#
|
||||
# build small default binary
|
||||
%configure \
|
||||
${COMMON_OPTIONS} --disable-gui --without-x --disable-gpm \
|
||||
--disable-perlinterp --disable-pythoninterp \
|
||||
--disable-rubyinterp --disable-tclinterp
|
||||
|
||||
# build vim
|
||||
%configure ${COMMON_OPTIONS} --without-x --disable-gui --disable-gpm
|
||||
sed -i -e 's|define HAVE_DATE_TIME 1|undef HAVE_DATE_TIME|' src/auto/config.h
|
||||
%make
|
||||
cp src/vim vim-normal
|
||||
cp src/vim vim
|
||||
|
||||
# build gvim
|
||||
make distclean
|
||||
#
|
||||
# build enhanced binary
|
||||
%configure ${COMMON_OPTIONS} ${SCRIPT_OPTIONS} --disable-gui
|
||||
sed -i -e 's|define HAVE_DATE_TIME 1|undef HAVE_DATE_TIME|' src/auto/config.h
|
||||
%make
|
||||
cp src/vim vim-enhanced
|
||||
make distclean
|
||||
#
|
||||
# build python binary
|
||||
%configure ${COMMON_OPTIONS} ${PYTHON_OPTIONS} --disable-gui
|
||||
sed -i -e 's|define HAVE_DATE_TIME 1|undef HAVE_DATE_TIME|' src/auto/config.h
|
||||
%make
|
||||
cp src/vim vim-python
|
||||
make distclean
|
||||
#
|
||||
# build enhanced gvim binary
|
||||
%configure ${COMMON_OPTIONS} ${SCRIPT_OPTIONS} ${GUI_OPTIONS}
|
||||
sed -i -e 's|define HAVE_DATE_TIME 1|undef HAVE_DATE_TIME|' src/auto/config.h
|
||||
%if 0%{?with_splitted_gvim}
|
||||
%make
|
||||
cp src/vim gvim-enhanced
|
||||
make distclean
|
||||
#
|
||||
# build gvim binary
|
||||
%configure ${COMMON_OPTIONS} ${GUI_OPTIONS}
|
||||
sed -i -e 's|define HAVE_DATE_TIME 1|undef HAVE_DATE_TIME|' src/auto/config.h
|
||||
%endif
|
||||
%make
|
||||
|
||||
#
|
||||
# build vitmp
|
||||
gcc %{optflags} %{SOURCE13} -o vitmp
|
||||
@ -383,36 +258,27 @@ install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
|
||||
# the last installed binary is gvim. preserve it and
|
||||
# fix its symlinks. e* was added here as it doesnt make much sense in
|
||||
# console
|
||||
mv -v %{buildroot}%{_bindir}/{vim,gvim-normal}
|
||||
mv %{buildroot}%{_bindir}/vim %{buildroot}%{_bindir}/gvim
|
||||
for f in egvim egview eview evim gex gvi gview gvimdiff rgview rgvim ; do
|
||||
ln -s -vf gvim %{buildroot}%{_bindir}/$f
|
||||
done
|
||||
|
||||
# install the other binaries
|
||||
install -D -m 0755 vim-normal %{buildroot}/bin/vim-normal
|
||||
install -D -m 0755 vim-enhanced %{buildroot}%{_bindir}/vim-enhanced
|
||||
install -D -m 0755 vim-python %{buildroot}%{_bindir}/vim-python
|
||||
%if 0%{?with_splitted_gvim}
|
||||
install -D -m 0755 gvim-enhanced %{buildroot}%{_bindir}/gvim-enhanced
|
||||
%endif
|
||||
# install vim
|
||||
install -D -m 0755 vim %{buildroot}/bin/vim
|
||||
|
||||
# compat symlinks
|
||||
# we need a dummy target for /etc/alternatives/vim
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/vim
|
||||
ln -s -f /etc/alternatives/vim %{buildroot}/bin/vim
|
||||
ln -s -f /bin/vim %{buildroot}/bin/vi
|
||||
ln -s -f /bin/vim %{buildroot}%{_bindir}/vim
|
||||
ln -s -f /bin/vim %{buildroot}%{_bindir}/vi
|
||||
ln -s -f vim %{buildroot}%{_bindir}/edit
|
||||
ln -s -f /bin/vim %{buildroot}/bin/ex
|
||||
ln -s -f /bin/vim %{buildroot}/bin/ex
|
||||
|
||||
# man pages
|
||||
ln -s -f vim.1.gz %{buildroot}%{_mandir}/man1/vi.1.gz
|
||||
ln -s -f vim.1.gz %{buildroot}%{_mandir}/man1/ex.1.gz
|
||||
|
||||
# vitmp
|
||||
install -m 0755 vitmp %{buildroot}%{_bindir}/vitmp
|
||||
install -m 0755 vitmp %{buildroot}%{_bindir}/vitmp
|
||||
install -m 0644 %{SOURCE14} %{buildroot}%{_mandir}/man1/vitmp.1
|
||||
install -m 0755 %{SOURCE15} %{buildroot}%{_datadir}/vim/%{VIM_SUBDIR}/tools/vim132
|
||||
|
||||
@ -487,76 +353,9 @@ mkdir -p %{buildroot}/var/run/vi.recover
|
||||
# Currently all tests pass
|
||||
make test
|
||||
|
||||
%post
|
||||
/usr/sbin/update-alternatives --install \
|
||||
/bin/vim vim /bin/vim-normal 15
|
||||
|
||||
%post base
|
||||
/usr/sbin/update-alternatives --install \
|
||||
/bin/vim vim %{_datadir}/vim/current/tools/missing-vim-client 0
|
||||
|
||||
%post enhanced
|
||||
/usr/sbin/update-alternatives --install \
|
||||
/bin/vim vim %{_bindir}/vim-enhanced 20
|
||||
|
||||
%post python
|
||||
/usr/sbin/update-alternatives --install \
|
||||
/bin/vim vim %{_bindir}/vim-python 18
|
||||
|
||||
%post -n gvim
|
||||
/usr/sbin/update-alternatives --install \
|
||||
%{_bindir}/gvim gvim %{_bindir}/gvim-normal 5
|
||||
/usr/sbin/update-alternatives --install \
|
||||
/bin/vim vim %{_bindir}/gvim 5
|
||||
%if 0%{?with_splitted_gvim}
|
||||
|
||||
%post -n gvim-enhanced
|
||||
/usr/sbin/update-alternatives --install \
|
||||
/bin/vim vim %{_bindir}/gvim-enhanced 10
|
||||
/usr/sbin/update-alternatives --install \
|
||||
%{_bindir}/gvim gvim %{_bindir}/gvim-enhanced 10
|
||||
%endif
|
||||
|
||||
%preun
|
||||
if [ "$1" = 0 ] ; then
|
||||
/usr/sbin/update-alternatives --remove vim /bin/vim-normal
|
||||
fi
|
||||
|
||||
%preun base
|
||||
if [ "$1" = 0 ] ; then
|
||||
/usr/sbin/update-alternatives --remove vim %{_datadir}/vim/current/tools/missing-vim-client
|
||||
fi
|
||||
|
||||
%preun enhanced
|
||||
if [ "$1" = 0 ] ; then
|
||||
/usr/sbin/update-alternatives --remove vim %{_bindir}/vim-enhanced
|
||||
fi
|
||||
|
||||
%preun python
|
||||
if [ "$1" = 0 ] ; then
|
||||
/usr/sbin/update-alternatives --remove vim %{_bindir}/vim-python
|
||||
fi
|
||||
|
||||
%preun -n gvim
|
||||
if [ "$1" = 0 ] ; then
|
||||
/usr/sbin/update-alternatives --remove vim %{_bindir}/gvim
|
||||
fi
|
||||
%if 0%{?with_splitted_gvim}
|
||||
|
||||
%preun -n gvim-enhanced
|
||||
if [ "$1" = 0 ] ; then
|
||||
/usr/sbin/update-alternatives --remove vim %{_bindir}/gvim-enhanced
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
/bin/vim-normal
|
||||
|
||||
%files base
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/vimrc
|
||||
%ghost %{_sysconfdir}/alternatives/vim
|
||||
# symlinks
|
||||
/bin/vi
|
||||
/bin/vim
|
||||
@ -685,23 +484,8 @@ fi
|
||||
%{_datadir}/vim/%{VIM_SUBDIR}/synmenu.vim
|
||||
%{_datadir}/vim/%{VIM_SUBDIR}/vimrc_example.vim
|
||||
|
||||
%files enhanced
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/vim-enhanced
|
||||
|
||||
%files python
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/vim-python
|
||||
|
||||
%files -n gvim
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/gvim-normal
|
||||
%if 0%{?with_splitted_gvim}
|
||||
|
||||
%files -n gvim-base
|
||||
%defattr(-,root,root,-)
|
||||
%endif
|
||||
%doc %{_docdir}/gvim
|
||||
%ghost %config(missingok) %{_sysconfdir}/gvimrc
|
||||
%{_bindir}/egview
|
||||
%{_bindir}/egvim
|
||||
@ -717,11 +501,6 @@ fi
|
||||
# menu icon
|
||||
%{_datadir}/applications/gvim.desktop
|
||||
%{_datadir}/icons/hicolor/48x48/apps/gvim.png
|
||||
%if 0%{?with_splitted_gvim}
|
||||
|
||||
%files -n gvim-enhanced
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/gvim-enhanced
|
||||
%endif
|
||||
%doc %{_docdir}/gvim
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user