Accepting request 831366 from home:kukuk:branches:editors
- Add vi as slave to update-alternatives so that every package has a matching "vi" symlink [bsc#1174564]. OBS-URL: https://build.opensuse.org/request/show/831366 OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=618
This commit is contained in:
parent
d2393766a8
commit
5273f22482
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 2 06:20:24 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
|
||||
|
||||
- Add vi as slave to update-alternatives so that every package
|
||||
has a matching "vi" symlink [bsc#1174564].
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 10 09:06:38 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
|
19
vim.spec
19
vim.spec
@ -308,6 +308,7 @@ install -D -m 0755 vim-small %{buildroot}%{_bindir}/vim-small
|
||||
install -D -m 0755 vim-nox11 %{buildroot}%{_bindir}/vim-nox11
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
ln -s -f %{_sysconfdir}/alternatives/vim %{buildroot}%{_bindir}/vim
|
||||
ln -s -f %{_sysconfdir}/alternatives/vi %{buildroot}%{_bindir}/vi
|
||||
|
||||
# compat symlinks
|
||||
mkdir %{buildroot}/bin
|
||||
@ -421,7 +422,9 @@ LC_ALL=en_US.UTF-8 make -j1 test
|
||||
%endif
|
||||
|
||||
%post
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/vim vim %{_bindir}/vim-nox11 20
|
||||
%{_sbindir}/update-alternatives \
|
||||
--install %{_bindir}/vim vim %{_bindir}/vim-nox11 20 \
|
||||
--slave %{_bindir}/vi vi %{_bindir}/vim-nox11
|
||||
|
||||
%postun
|
||||
if [ ! -e %{_bindir}/vim-nox11 ] ; then
|
||||
@ -429,7 +432,10 @@ if [ ! -e %{_bindir}/vim-nox11 ] ; then
|
||||
fi
|
||||
|
||||
%post -n gvim
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/vim vim %{_bindir}/gvim 30
|
||||
%{_sbindir}/update-alternatives \
|
||||
--install %{_bindir}/vim vim %{_bindir}/gvim 30 \
|
||||
--slave %{_bindir}/vi vi %{_bindir}/gvim
|
||||
|
||||
%icon_theme_cache_post
|
||||
|
||||
%postun -n gvim
|
||||
@ -439,13 +445,16 @@ fi
|
||||
%icon_theme_cache_postun
|
||||
|
||||
%post small
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/vim vim %{_bindir}/vim-small 19
|
||||
%{_sbindir}/update-alternatives \
|
||||
--install %{_bindir}/vim vim %{_bindir}/vim-small 19 \
|
||||
--slave %{_bindir}/vi vi %{_bindir}/vim-small
|
||||
|
||||
%postun small
|
||||
%{_sbindir}/update-alternatives --remove vim %{_bindir}/vim-small
|
||||
|
||||
%files
|
||||
%ghost %{_sysconfdir}/alternatives/vim
|
||||
%ghost %{_sysconfdir}/alternatives/vi
|
||||
%{_bindir}/vim-nox11
|
||||
%{_bindir}/vim
|
||||
# symlinks
|
||||
@ -577,6 +586,8 @@ fi
|
||||
%doc runtime/doc/gui_x11.txt
|
||||
%ghost %config(missingok) %{_sysconfdir}/gvimrc
|
||||
%ghost %{_sysconfdir}/alternatives/vim
|
||||
%ghost %{_sysconfdir}/alternatives/vi
|
||||
%{_bindir}/vi
|
||||
%{_bindir}/vim
|
||||
%{_bindir}/egview
|
||||
%{_bindir}/egvim
|
||||
@ -597,6 +608,8 @@ fi
|
||||
%files small
|
||||
%license LICENSE
|
||||
%ghost %{_sysconfdir}/alternatives/vim
|
||||
%ghost %{_sysconfdir}/alternatives/vi
|
||||
%{_bindir}/vi
|
||||
%{_bindir}/vim
|
||||
%{_bindir}/vim-small
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user