Accepting request 115281 from home:saschpe:branches:editors
Add a vim-python subpackage that only enables Python interpreter support (and X11 clibboard, too), for users that don't want the extra dependencies of vim-enhanced (basically the perl, ruby and tcl base packages) OBS-URL: https://build.opensuse.org/request/show/115281 OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=95
This commit is contained in:
parent
4d9f6f4882
commit
8b1294c638
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 25 08:53:49 UTC 2012 - saschpe@suse.de
|
||||
|
||||
- Add a vim-python subpackage that only enables Python interpreter support
|
||||
(and X11 clibboard, too), for users that don't want the extra dependencies
|
||||
of vim-enhanced (basically the perl, ruby and tcl base packages)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 24 20:08:15 UTC 2012 - idonmez@suse.com
|
||||
|
||||
|
53
vim.spec
53
vim.spec
@ -130,7 +130,6 @@ 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}
|
||||
@ -153,7 +152,6 @@ 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}
|
||||
@ -177,7 +175,6 @@ 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}
|
||||
@ -198,10 +195,28 @@ 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
|
||||
# It makes little sense to have both the 'python' and 'enhanced' versions installed:
|
||||
Conflicts: vim-enhanced = %{version}
|
||||
|
||||
%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}
|
||||
@ -212,7 +227,6 @@ Requires: gvim_client
|
||||
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}
|
||||
@ -223,11 +237,9 @@ 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}
|
||||
@ -305,7 +317,9 @@ export SCRIPT_OPTIONS="\
|
||||
--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"
|
||||
export GUI_OPTIONS="\
|
||||
--enable-xim \
|
||||
--enable-fontset \
|
||||
@ -333,6 +347,13 @@ sed -i -e 's|define HAVE_DATE_TIME 1|undef HAVE_DATE_TIME|' src/auto/config.h
|
||||
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
|
||||
@ -366,6 +387,7 @@ 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
|
||||
@ -473,6 +495,10 @@ fi
|
||||
/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
|
||||
@ -502,6 +528,11 @@ 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
|
||||
@ -654,6 +685,10 @@ fi
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/vim-enhanced
|
||||
|
||||
%files python
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/vim-python
|
||||
|
||||
%files -n gvim
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/gvim-normal
|
||||
|
Loading…
Reference in New Issue
Block a user