From 7866a29fa71455a5c17a00b57611bd8d145a4ecd Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 12 Oct 2020 16:57:43 +0200 Subject: [PATCH] fix installing fish profile, set virtual provide for default editor (thanks Neal Gompa and Kamil Dudka) set conflicts to nano-default-editor which doesnt provide system-default-editor --- vim.spec | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/vim.spec b/vim.spec index 3946dfe6..f7f704d9 100644 --- a/vim.spec +++ b/vim.spec @@ -21,7 +21,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{patchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Vim and MIT Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 Source1: vim.sh @@ -220,13 +220,16 @@ with graphics and mouse capabilities. You'll also need to install the vim-common package. %package default-editor -Summary: Set vim as a default editor +Summary: Set vim as the default editor Requires: vim-enhanced BuildArch: noarch -Conflicts: nano-default-editor +Provides: system-default-editor +Conflicts: system-default-editor +# conflict with nano-default-editor which doesn't provide system-default-editor +Conflicts: nano-default-editor < 5.3-3 %description default-editor -This subpackage contains files needed to set Vim as a default editor. +This subpackage contains files needed to set Vim as the default editor. %prep %setup -q -b 0 -n %{vimdir} @@ -533,9 +536,11 @@ cp %{SOURCE1} %{buildroot}/%{_sysconfdir}/profile.d/vim.sh cp %{SOURCE2} %{buildroot}/%{_sysconfdir}/profile.d/vim.csh cp %{SOURCE16} %{buildroot}/%{_sysconfdir}/profile.d/vim-default-editor.sh cp %{SOURCE17} %{buildroot}/%{_sysconfdir}/profile.d/vim-default-editor.csh -cp %{SOURCE18} %{buildroot}/%{_sysconfdir}/profile.d/vim-default-editor.fish chmod 0644 %{buildroot}/%{_sysconfdir}/profile.d/vim.* chmod 0644 %{buildroot}/%{_sysconfdir}/profile.d/vim-default-editor.* +mkdir -p %{buildroot}/%{_datadir}/fish/vendor_conf.d/ +cp %{SOURCE18} %{buildroot}/%{_datadir}/fish/vendor_conf.d/vim-default-editor.fish +chmod 0644 %{buildroot}/%{_datadir}/fish/vendor_conf.d/vim-default-editor.fish install -p -m644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/virc install -p -m644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/vimrc @@ -802,9 +807,17 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %{_datadir}/icons/locolor/*/apps/* %files default-editor +%dir %{_sysconfdir}/profile.d %config(noreplace) %{_sysconfdir}/profile.d/vim-default-editor.* +%dir %{_datadir}/fish/vendor_conf.d +%config(noreplace) %{_datadir}/fish/vendor_conf.d/vim-default-editor.fish %changelog +* Mon Oct 12 2020 Zdenek Dohnal - 2:8.2.1815-2 +- fix installing fish profile, set virtual provide for default editor + (thanks Neal Gompa and Kamil Dudka) +- set conflicts to nano-default-editor which doesnt provide system-default-editor + * Fri Oct 09 2020 Paweł Marciniak - 2:8.2.1815-2 - A new subpackage, set vim as a default editor.