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_regex_char_classes \
|
||||||
test_regexp_latin \
|
test_regexp_latin \
|
||||||
test_regexp_utf8 \
|
test_regexp_utf8 \
|
||||||
@@ -459,7 +452,6 @@ NEW_TESTS_RES = \
|
@@ -458,7 +451,6 @@ NEW_TESTS_RES = \
|
||||||
test_quickfix.res \
|
test_quickfix.res \
|
||||||
test_quotestar.res \
|
test_quotestar.res \
|
||||||
test_random.res \
|
test_random.res \
|
||||||
|
@ -10,7 +10,7 @@ Index: vim-8.2.3075/src/testdir/Make_all.mak
|
|||||||
test_balloon_gui \
|
test_balloon_gui \
|
||||||
test_behave \
|
test_behave \
|
||||||
test_blob \
|
test_blob \
|
||||||
@@ -203,7 +202,6 @@ NEW_TESTS = \
|
@@ -204,7 +203,6 @@ NEW_TESTS = \
|
||||||
test_netbeans \
|
test_netbeans \
|
||||||
test_normal \
|
test_normal \
|
||||||
test_number \
|
test_number \
|
||||||
@ -18,7 +18,15 @@ Index: vim-8.2.3075/src/testdir/Make_all.mak
|
|||||||
test_packadd \
|
test_packadd \
|
||||||
test_partial \
|
test_partial \
|
||||||
test_paste \
|
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_autocmd.res \
|
||||||
test_autoload.res \
|
test_autoload.res \
|
||||||
test_backspace_opt.res \
|
test_backspace_opt.res \
|
||||||
@ -26,6 +34,14 @@ Index: vim-8.2.3075/src/testdir/Make_all.mak
|
|||||||
test_balloon_gui.res \
|
test_balloon_gui.res \
|
||||||
test_blob.res \
|
test_blob.res \
|
||||||
test_blockedit.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
|
Index: vim-8.2.3075/src/testdir/Makefile
|
||||||
===================================================================
|
===================================================================
|
||||||
--- vim-8.2.3075.orig/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>
|
Fri Oct 22 13:53:00 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||||
|
|
||||||
|
101
vim.spec
101
vim.spec
@ -23,6 +23,13 @@
|
|||||||
%define site_runtimepath %{_datadir}/vim/site
|
%define site_runtimepath %{_datadir}/vim/site
|
||||||
%define make make VIMRCLOC=%{_sysconfdir} VIMRUNTIMEDIR=%{_datadir}/vim/current MAKE="make -e" %{?_smp_mflags}
|
%define make make VIMRCLOC=%{_sysconfdir} VIMRUNTIMEDIR=%{_datadir}/vim/current MAKE="make -e" %{?_smp_mflags}
|
||||||
%bcond_without python2
|
%bcond_without python2
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: vim
|
Name: vim
|
||||||
Version: %{pkg_version}.%{patchlevel_compact}
|
Version: %{pkg_version}.%{patchlevel_compact}
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -90,8 +97,12 @@ BuildRequires: pkgconfig(lua)
|
|||||||
BuildRequires: pkgconfig(python3)
|
BuildRequires: pkgconfig(python3)
|
||||||
BuildRequires: pkgconfig(xt)
|
BuildRequires: pkgconfig(xt)
|
||||||
Requires: vim-data-common = %{version}-%{release}
|
Requires: vim-data-common = %{version}-%{release}
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
Recommends: vim-data = %{version}-%{release}
|
Recommends: vim-data = %{version}-%{release}
|
||||||
Conflicts: vim-base < 8.2
|
Conflicts: vim-base < 8.2
|
||||||
Provides: vi
|
Provides: vi
|
||||||
@ -139,8 +150,13 @@ Summary: A GUI for Vi
|
|||||||
Group: Productivity/Text/Editors
|
Group: Productivity/Text/Editors
|
||||||
Requires: gvim_client
|
Requires: gvim_client
|
||||||
Requires: vim-data = %{version}-%{release}
|
Requires: vim-data = %{version}-%{release}
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
Conflicts: gvim < 8.2
|
Conflicts: gvim < 8.2
|
||||||
Provides: gvim-base = %{version}-%{release}
|
Provides: gvim-base = %{version}-%{release}
|
||||||
Provides: gvim-enhanced = %{version}-%{release}
|
Provides: gvim-enhanced = %{version}-%{release}
|
||||||
@ -159,8 +175,13 @@ want less features, you might want to install vim instead.
|
|||||||
%package small
|
%package small
|
||||||
Summary: Vim with reduced features
|
Summary: Vim with reduced features
|
||||||
Group: Productivity/Text/Editors
|
Group: Productivity/Text/Editors
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
Provides: vi
|
Provides: vi
|
||||||
Provides: vim_client
|
Provides: vim_client
|
||||||
Requires: vim-data-common = %{version}-%{release}
|
Requires: vim-data-common = %{version}-%{release}
|
||||||
@ -310,9 +331,40 @@ done
|
|||||||
# install vim
|
# install vim
|
||||||
install -D -m 0755 vim-small %{buildroot}%{_bindir}/vim-small
|
install -D -m 0755 vim-small %{buildroot}%{_bindir}/vim-small
|
||||||
install -D -m 0755 vim-nox11 %{buildroot}%{_bindir}/vim-nox11
|
install -D -m 0755 vim-nox11 %{buildroot}%{_bindir}/vim-nox11
|
||||||
|
%if ! %{with libalternatives}
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
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
|
||||||
|
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
|
# compat symlinks
|
||||||
mkdir %{buildroot}/bin
|
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
|
LC_ALL=en_US.UTF-8 make -j1 test
|
||||||
%endif
|
%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
|
%post
|
||||||
%{_sbindir}/update-alternatives \
|
%{_sbindir}/update-alternatives \
|
||||||
--install %{_bindir}/vim vim %{_bindir}/vim-nox11 20 \
|
--install %{_bindir}/vim vim %{_bindir}/vim-nox11 20 \
|
||||||
@ -460,10 +536,19 @@ fi
|
|||||||
if [ ! -e %{_bindir}/vim-small ] ; then
|
if [ ! -e %{_bindir}/vim-small ] ; then
|
||||||
%{_sbindir}/update-alternatives --remove vim %{_bindir}/vim-small
|
%{_sbindir}/update-alternatives --remove vim %{_bindir}/vim-small
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%if ! %{with libalternatives}
|
||||||
%ghost %{_sysconfdir}/alternatives/vim
|
%ghost %{_sysconfdir}/alternatives/vim
|
||||||
%ghost %{_sysconfdir}/alternatives/vi
|
%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-nox11
|
||||||
%{_bindir}/vim
|
%{_bindir}/vim
|
||||||
# symlinks
|
# symlinks
|
||||||
@ -596,8 +681,16 @@ fi
|
|||||||
%files -n gvim
|
%files -n gvim
|
||||||
%doc runtime/doc/gui_x11.txt
|
%doc runtime/doc/gui_x11.txt
|
||||||
%ghost %config(missingok) %{_sysconfdir}/gvimrc
|
%ghost %config(missingok) %{_sysconfdir}/gvimrc
|
||||||
|
%if ! %{with libalternatives}
|
||||||
%ghost %{_sysconfdir}/alternatives/vim
|
%ghost %{_sysconfdir}/alternatives/vim
|
||||||
%ghost %{_sysconfdir}/alternatives/vi
|
%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}/vi
|
||||||
%{_bindir}/vim
|
%{_bindir}/vim
|
||||||
%{_bindir}/egview
|
%{_bindir}/egview
|
||||||
@ -618,8 +711,16 @@ fi
|
|||||||
|
|
||||||
%files small
|
%files small
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
%if ! %{with libalternatives}
|
||||||
%ghost %{_sysconfdir}/alternatives/vim
|
%ghost %{_sysconfdir}/alternatives/vim
|
||||||
%ghost %{_sysconfdir}/alternatives/vi
|
%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}/vi
|
||||||
%{_bindir}/vim
|
%{_bindir}/vim
|
||||||
%{_bindir}/vim-small
|
%{_bindir}/vim-small
|
||||||
|
Loading…
Reference in New Issue
Block a user