Accepting request 928115 from home:schubi2
- Use libalternatives instead of update-alternatives. - Test_suspend disabled temporary. Updated patches: disable-unreliable-tests-arch.patch, disable-unreliable-tests.patch OBS-URL: https://build.opensuse.org/request/show/928115 OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=683
This commit is contained in:
parent
f3ed31b3a4
commit
ec81c2bb25
@ -34,7 +34,7 @@ Index: vim-8.2.3318/src/testdir/Make_all.mak
|
||||
test_regex_char_classes \
|
||||
test_regexp_latin \
|
||||
test_regexp_utf8 \
|
||||
@@ -459,7 +452,6 @@ NEW_TESTS_RES = \
|
||||
@@ -458,7 +451,6 @@ NEW_TESTS_RES = \
|
||||
test_quickfix.res \
|
||||
test_quotestar.res \
|
||||
test_random.res \
|
||||
|
@ -10,7 +10,7 @@ Index: vim-8.2.3075/src/testdir/Make_all.mak
|
||||
test_balloon_gui \
|
||||
test_behave \
|
||||
test_blob \
|
||||
@@ -203,7 +202,6 @@ NEW_TESTS = \
|
||||
@@ -204,7 +203,6 @@ NEW_TESTS = \
|
||||
test_netbeans \
|
||||
test_normal \
|
||||
test_number \
|
||||
@ -18,7 +18,15 @@ Index: vim-8.2.3075/src/testdir/Make_all.mak
|
||||
test_packadd \
|
||||
test_partial \
|
||||
test_paste \
|
||||
@@ -323,7 +320,6 @@ NEW_TESTS_RES = \
|
||||
@@ -262,7 +260,6 @@ NEW_TESTS = \
|
||||
test_stat \
|
||||
test_statusline \
|
||||
test_substitute \
|
||||
- test_suspend \
|
||||
test_swap \
|
||||
test_syn_attr \
|
||||
test_syntax \
|
||||
@@ -324,7 +321,6 @@ NEW_TESTS_RES = \
|
||||
test_autocmd.res \
|
||||
test_autoload.res \
|
||||
test_backspace_opt.res \
|
||||
@ -26,6 +34,14 @@ Index: vim-8.2.3075/src/testdir/Make_all.mak
|
||||
test_balloon_gui.res \
|
||||
test_blob.res \
|
||||
test_blockedit.res \
|
||||
@@ -490,7 +486,6 @@ NEW_TESTS_RES = \
|
||||
test_stat.res \
|
||||
test_statusline.res \
|
||||
test_substitute.res \
|
||||
- test_suspend.res \
|
||||
test_swap.res \
|
||||
test_syn_attr.res \
|
||||
test_syntax.res \
|
||||
Index: vim-8.2.3075/src/testdir/Makefile
|
||||
===================================================================
|
||||
--- vim-8.2.3075.orig/src/testdir/Makefile
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 22 14:53:00 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||
|
||||
- Use libalternatives instead of update-alternatives.
|
||||
- Test_suspend disabled temporary.
|
||||
Updated patches:
|
||||
disable-unreliable-tests-arch.patch, disable-unreliable-tests.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 22 13:53:00 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
|
107
vim.spec
107
vim.spec
@ -23,6 +23,13 @@
|
||||
%define site_runtimepath %{_datadir}/vim/site
|
||||
%define make make VIMRCLOC=%{_sysconfdir} VIMRUNTIMEDIR=%{_datadir}/vim/current MAKE="make -e" %{?_smp_mflags}
|
||||
%bcond_without python2
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
Name: vim
|
||||
Version: %{pkg_version}.%{patchlevel_compact}
|
||||
Release: 0
|
||||
@ -90,8 +97,12 @@ BuildRequires: pkgconfig(lua)
|
||||
BuildRequires: pkgconfig(python3)
|
||||
BuildRequires: pkgconfig(xt)
|
||||
Requires: vim-data-common = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
Recommends: vim-data = %{version}-%{release}
|
||||
Conflicts: vim-base < 8.2
|
||||
Provides: vi
|
||||
@ -139,8 +150,13 @@ Summary: A GUI for Vi
|
||||
Group: Productivity/Text/Editors
|
||||
Requires: gvim_client
|
||||
Requires: vim-data = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
Conflicts: gvim < 8.2
|
||||
Provides: gvim-base = %{version}-%{release}
|
||||
Provides: gvim-enhanced = %{version}-%{release}
|
||||
@ -159,8 +175,13 @@ want less features, you might want to install vim instead.
|
||||
%package small
|
||||
Summary: Vim with reduced features
|
||||
Group: Productivity/Text/Editors
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
Provides: vi
|
||||
Provides: vim_client
|
||||
Requires: vim-data-common = %{version}-%{release}
|
||||
@ -310,9 +331,40 @@ done
|
||||
# install vim
|
||||
install -D -m 0755 vim-small %{buildroot}%{_bindir}/vim-small
|
||||
install -D -m 0755 vim-nox11 %{buildroot}%{_bindir}/vim-nox11
|
||||
%if ! %{with libalternatives}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
ln -s -f %{_sysconfdir}/alternatives/vim %{buildroot}%{_bindir}/vim
|
||||
ln -s -f %{_sysconfdir}/alternatives/vi %{buildroot}%{_bindir}/vi
|
||||
%else
|
||||
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/vi
|
||||
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/vim
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/vi
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/vi/20.conf <<EOF
|
||||
binary=%{_bindir}/vim-nox11
|
||||
group=vim, vi
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/vi/30.conf <<EOF
|
||||
binary=%{_bindir}/gvim
|
||||
group=vim, vi
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/vi/19.conf <<EOF
|
||||
binary=%{_bindir}/vim-small
|
||||
group=vim, vi
|
||||
EOF
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/vim
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/vim/20.conf <<EOF
|
||||
binary=%{_bindir}/vim-nox11
|
||||
group=vim, vi
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/vim/30.conf <<EOF
|
||||
binary=%{_bindir}/gvim
|
||||
group=vim, vi
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/vim/19.conf <<EOF
|
||||
binary=%{_bindir}/vim-small
|
||||
group=vim, vi
|
||||
EOF
|
||||
%endif
|
||||
|
||||
# compat symlinks
|
||||
mkdir %{buildroot}/bin
|
||||
@ -428,6 +480,30 @@ LC_ALL=en_US.UTF-8 make -j1 test || { echo "Ignore transient errors for PowerPC.
|
||||
LC_ALL=en_US.UTF-8 make -j1 test
|
||||
%endif
|
||||
|
||||
%if %{with libalternatives}
|
||||
# with libalternatives
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] && [ ! -e %{_bindir}/vim-nox11 ]; then
|
||||
%{_sbindir}/update-alternatives --remove vim %{_bindir}/vim-nox11
|
||||
fi
|
||||
|
||||
%pre -n gvim
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] && [ ! -e %{_bindir}/gvim ] ; then
|
||||
%{_sbindir}/update-alternatives --remove vim %{_bindir}/gvim
|
||||
fi
|
||||
|
||||
%pre small
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] && [ ! -e %{_bindir}/vim-small ]; then
|
||||
%{_sbindir}/update-alternatives --remove vim %{_bindir}/vim-small
|
||||
fi
|
||||
|
||||
%post -n gvim
|
||||
%icon_theme_cache_post
|
||||
%postun -n gvim
|
||||
%icon_theme_cache_postun
|
||||
%else
|
||||
# without libalternatives
|
||||
%post
|
||||
%{_sbindir}/update-alternatives \
|
||||
--install %{_bindir}/vim vim %{_bindir}/vim-nox11 20 \
|
||||
@ -460,10 +536,19 @@ fi
|
||||
if [ ! -e %{_bindir}/vim-small ] ; then
|
||||
%{_sbindir}/update-alternatives --remove vim %{_bindir}/vim-small
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%if ! %{with libalternatives}
|
||||
%ghost %{_sysconfdir}/alternatives/vim
|
||||
%ghost %{_sysconfdir}/alternatives/vi
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/vi
|
||||
%{_datadir}/libalternatives/vi/20.conf
|
||||
%dir %{_datadir}/libalternatives/vim
|
||||
%{_datadir}/libalternatives/vim/20.conf
|
||||
%endif
|
||||
%{_bindir}/vim-nox11
|
||||
%{_bindir}/vim
|
||||
# symlinks
|
||||
@ -596,8 +681,16 @@ fi
|
||||
%files -n gvim
|
||||
%doc runtime/doc/gui_x11.txt
|
||||
%ghost %config(missingok) %{_sysconfdir}/gvimrc
|
||||
%if ! %{with libalternatives}
|
||||
%ghost %{_sysconfdir}/alternatives/vim
|
||||
%ghost %{_sysconfdir}/alternatives/vi
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/vi
|
||||
%{_datadir}/libalternatives/vi/30.conf
|
||||
%dir %{_datadir}/libalternatives/vim
|
||||
%{_datadir}/libalternatives/vim/30.conf
|
||||
%endif
|
||||
%{_bindir}/vi
|
||||
%{_bindir}/vim
|
||||
%{_bindir}/egview
|
||||
@ -618,8 +711,16 @@ fi
|
||||
|
||||
%files small
|
||||
%license LICENSE
|
||||
%if ! %{with libalternatives}
|
||||
%ghost %{_sysconfdir}/alternatives/vim
|
||||
%ghost %{_sysconfdir}/alternatives/vi
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/vi
|
||||
%{_datadir}/libalternatives/vi/19.conf
|
||||
%dir %{_datadir}/libalternatives/vim
|
||||
%{_datadir}/libalternatives/vim/19.conf
|
||||
%endif
|
||||
%{_bindir}/vi
|
||||
%{_bindir}/vim
|
||||
%{_bindir}/vim-small
|
||||
|
Loading…
Reference in New Issue
Block a user