fix
OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=693
This commit is contained in:
parent
3fc04218b5
commit
d48f17a86d
97
vim.spec
97
vim.spec
@ -324,13 +324,19 @@ done
|
|||||||
install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
|
install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
|
||||||
install -m 0644 %{SOURCE24} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/gvim.svg
|
install -m 0644 %{SOURCE24} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/gvim.svg
|
||||||
|
|
||||||
# the last installed binary is gvim. preserve it and
|
# the last installed binary is gvim. preserve it
|
||||||
# fix its symlinks. e* was added here as it doesnt make much sense in
|
|
||||||
# console
|
|
||||||
mv %{buildroot}%{_bindir}/vim %{buildroot}%{_bindir}/gvim
|
mv %{buildroot}%{_bindir}/vim %{buildroot}%{_bindir}/gvim
|
||||||
|
%if %{with libalternatives}
|
||||||
|
for f in vimdiff ex view rview rvim; do
|
||||||
|
rm %{buildroot}%{_bindir}/$f
|
||||||
|
done
|
||||||
|
%else
|
||||||
|
# fix gvim symlinks. e* was added here as it doesnt make much sense in
|
||||||
|
# console
|
||||||
for f in egvim egview eview evim gex gvi gview gvimdiff rgview rgvim ; do
|
for f in egvim egview eview evim gex gvi gview gvimdiff rgview rgvim ; do
|
||||||
ln -s -vf gvim %{buildroot}%{_bindir}/$f
|
ln -s -vf gvim %{buildroot}%{_bindir}/$f
|
||||||
done
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
# install vim
|
# install vim
|
||||||
install -D -m 0755 vim-small %{buildroot}%{_bindir}/vim-small
|
install -D -m 0755 vim-small %{buildroot}%{_bindir}/vim-small
|
||||||
@ -340,40 +346,31 @@ mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|||||||
ln -s -f %{_sysconfdir}/alternatives/vim %{buildroot}%{_bindir}/vim
|
ln -s -f %{_sysconfdir}/alternatives/vim %{buildroot}%{_bindir}/vim
|
||||||
ln -s -f %{_sysconfdir}/alternatives/vi %{buildroot}%{_bindir}/vi
|
ln -s -f %{_sysconfdir}/alternatives/vi %{buildroot}%{_bindir}/vi
|
||||||
%else
|
%else
|
||||||
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/vi
|
for f in vi vim rvim evim eview egview view rview vimdiff edit ex egvim gex gvi gview gvimdiff rgview rgvim ; do
|
||||||
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/vim
|
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/$f
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/vi
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/$f
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/vi/20.conf <<EOF
|
done
|
||||||
|
for f in vi vim rvim view rview vimdiff edit ex; do
|
||||||
|
cat > %{buildroot}%{_datadir}/libalternatives/$f/20.conf <<EOF
|
||||||
binary=%{_bindir}/vim-nox11
|
binary=%{_bindir}/vim-nox11
|
||||||
group=vim, vi, eview, evim, rview, rvim, vimdiff, edit, ex
|
group=vim,vi
|
||||||
options=KeepArgv0
|
options=KeepArgv0
|
||||||
EOF
|
EOF
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/vi/30.conf <<EOF
|
done
|
||||||
|
for f in vi vim evim rvim egview eview view rview vimdiff edit ex egvim gex gvi gview gvimdiff rgview rgvim ; do
|
||||||
|
cat > %{buildroot}%{_datadir}/libalternatives/$f/30.conf <<EOF
|
||||||
binary=%{_bindir}/gvim
|
binary=%{_bindir}/gvim
|
||||||
group=vim, vi, egvim, gview, eview, evim, gex, gvi, gview, gvimdiff, rgview, rgvim
|
group=vi,vim
|
||||||
options=KeepArgv0
|
options=KeepArgv0
|
||||||
EOF
|
EOF
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/vi/19.conf <<EOF
|
done
|
||||||
|
for f in vim vi ; do
|
||||||
|
cat > %{buildroot}%{_datadir}/libalternatives/$f/19.conf <<EOF
|
||||||
binary=%{_bindir}/vim-small
|
binary=%{_bindir}/vim-small
|
||||||
group=vim, vi
|
group=vim,vi
|
||||||
options=KeepArgv0
|
|
||||||
EOF
|
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/vim
|
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/vim/20.conf <<EOF
|
|
||||||
binary=%{_bindir}/vim-nox11
|
|
||||||
group=vim, vi, eview, evim, rview, rvim, vimdiff, edit, ex
|
|
||||||
options=KeepArgv0
|
|
||||||
EOF
|
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/vim/30.conf <<EOF
|
|
||||||
binary=%{_bindir}/gvim
|
|
||||||
group=vim, vi, egvim, gview, eview, evim, gex, gvi, gview, gvimdiff, rgview, rgvim
|
|
||||||
options=KeepArgv0
|
|
||||||
EOF
|
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/vim/19.conf <<EOF
|
|
||||||
binary=%{_bindir}/vim-small
|
|
||||||
group=vim, vi
|
|
||||||
options=KeepArgv0
|
options=KeepArgv0
|
||||||
EOF
|
EOF
|
||||||
|
done
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# compat symlinks
|
# compat symlinks
|
||||||
@ -560,6 +557,18 @@ fi
|
|||||||
%{_datadir}/libalternatives/vi/20.conf
|
%{_datadir}/libalternatives/vi/20.conf
|
||||||
%dir %{_datadir}/libalternatives/vim
|
%dir %{_datadir}/libalternatives/vim
|
||||||
%{_datadir}/libalternatives/vim/20.conf
|
%{_datadir}/libalternatives/vim/20.conf
|
||||||
|
%dir %{_datadir}/libalternatives/rvim
|
||||||
|
%{_datadir}/libalternatives/rvim/20.conf
|
||||||
|
%dir %{_datadir}/libalternatives/view
|
||||||
|
%{_datadir}/libalternatives/view/20.conf
|
||||||
|
%dir %{_datadir}/libalternatives/rview
|
||||||
|
%{_datadir}/libalternatives/rview/20.conf
|
||||||
|
%dir %{_datadir}/libalternatives/ex
|
||||||
|
%{_datadir}/libalternatives/ex/20.conf
|
||||||
|
%dir %{_datadir}/libalternatives/edit
|
||||||
|
%{_datadir}/libalternatives/edit/20.conf
|
||||||
|
%dir %{_datadir}/libalternatives/vimdiff
|
||||||
|
%{_datadir}/libalternatives/vimdiff/20.conf
|
||||||
%endif
|
%endif
|
||||||
%{_bindir}/vim-nox11
|
%{_bindir}/vim-nox11
|
||||||
%{_bindir}/vim
|
%{_bindir}/vim
|
||||||
@ -701,6 +710,38 @@ fi
|
|||||||
%{_datadir}/libalternatives/vi/30.conf
|
%{_datadir}/libalternatives/vi/30.conf
|
||||||
%dir %{_datadir}/libalternatives/vim
|
%dir %{_datadir}/libalternatives/vim
|
||||||
%{_datadir}/libalternatives/vim/30.conf
|
%{_datadir}/libalternatives/vim/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/rvim
|
||||||
|
%{_datadir}/libalternatives/rvim/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/view
|
||||||
|
%{_datadir}/libalternatives/view/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/rview
|
||||||
|
%{_datadir}/libalternatives/rview/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/eview
|
||||||
|
%{_datadir}/libalternatives/eview/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/ex
|
||||||
|
%{_datadir}/libalternatives/ex/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/edit
|
||||||
|
%{_datadir}/libalternatives/edit/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/vimdiff
|
||||||
|
%{_datadir}/libalternatives/vimdiff/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/egvim
|
||||||
|
%{_datadir}/libalternatives/egvim/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/egview
|
||||||
|
%{_datadir}/libalternatives/egview/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/evim
|
||||||
|
%{_datadir}/libalternatives/evim/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/gex
|
||||||
|
%{_datadir}/libalternatives/gex/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/gvi
|
||||||
|
%{_datadir}/libalternatives/gvi/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/gview
|
||||||
|
%{_datadir}/libalternatives/gview/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/gvimdiff
|
||||||
|
%{_datadir}/libalternatives/gvimdiff/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/rgvim
|
||||||
|
%{_datadir}/libalternatives/rgvim/30.conf
|
||||||
|
%dir %{_datadir}/libalternatives/rgview
|
||||||
|
%{_datadir}/libalternatives/rgview/30.conf
|
||||||
%endif
|
%endif
|
||||||
%{_bindir}/vi
|
%{_bindir}/vi
|
||||||
%{_bindir}/vim
|
%{_bindir}/vim
|
||||||
|
Loading…
Reference in New Issue
Block a user