diff --git a/vim.spec b/vim.spec index 35ca4de..4ee6164 100644 --- a/vim.spec +++ b/vim.spec @@ -7,6 +7,12 @@ %define desktop_file_utils_version 0.2.93 %endif +%if 0%{?fedora} +%bcond_without default_editor +%else +%bcond_with default_editor +%endif + %define withnetbeans 1 %define withvimspell 0 @@ -21,7 +27,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Vim and MIT Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 Source1: virc @@ -224,6 +230,7 @@ Install the vim-X11 package if you'd like to try out a version of vi with graphics and mouse capabilities. You'll also need to install the vim-common package. +%if %{with default_editor} %package default-editor Summary: Set vim as the default editor BuildArch: noarch @@ -235,6 +242,7 @@ Requires: vim-enhanced %description default-editor This subpackage contains files needed to set Vim as the default editor. +%endif %prep @@ -540,12 +548,17 @@ chmod 644 %{buildroot}/%{_datadir}/%{name}/%{vimdir}/doc/vim2html.pl \ %{buildroot}/%{_datadir}/%{name}/%{vimdir}/tools/vim132 chmod 644 ../runtime/doc/vim2html.pl +mkdir -p %{buildroot}/%{_sysconfdir} + +%if %{with default_editor} mkdir -p %{buildroot}/%{_sysconfdir}/profile.d install -p -m644 %{SOURCE9} %{buildroot}/%{_sysconfdir}/profile.d/vim-default-editor.sh install -p -m644 %{SOURCE10} %{buildroot}/%{_sysconfdir}/profile.d/vim-default-editor.csh mkdir -p %{buildroot}/%{_datadir}/fish/vendor_conf.d/ install -p -m644 %{SOURCE11} %{buildroot}/%{_datadir}/fish/vendor_conf.d/vim-default-editor.fish mkdir -p %{buildroot}/%{_datadir}/fish/vendor_functions.d/ +%endif + install -p -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/virc install -p -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/vimrc @@ -812,13 +825,18 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %dir %{_datadir}/icons/locolor/*/apps %{_datadir}/icons/locolor/*/apps/* +%if %{with default_editor} %files default-editor %dir %{_datadir}/fish/vendor_conf.d %{_datadir}/fish/vendor_conf.d/vim-default-editor.fish %dir %{_sysconfdir}/profile.d %config(noreplace) %{_sysconfdir}/profile.d/vim-default-editor.* +%endif %changelog +* Wed May 05 2021 Zdenek Dohnal - 2:8.2.2825-2 +- make default-editor built only on Fedora + * Mon May 03 2021 Zdenek Dohnal - 2:8.2.2825-1 - patchlevel 2825