Resolves: #1957128 - build nano-default-editor by default only on fedora

Red Hat is not going to maintain the nano-default-editor subpackage
in RHEL.
This commit is contained in:
Kamil Dudka 2021-05-05 09:38:56 +02:00
parent 5c5b1334ec
commit 1f274a7979

View File

@ -1,7 +1,14 @@
# build nano-default-editor by default only on fedora
%if 0%{?fedora}
%bcond_without default_editor
%else
%bcond_with default_editor
%endif
Summary: A small text editor Summary: A small text editor
Name: nano Name: nano
Version: 5.6.1 Version: 5.6.1
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv3+ License: GPLv3+
URL: https://www.nano-editor.org URL: https://www.nano-editor.org
Source: https://www.nano-editor.org/dist/latest/%{name}-%{version}.tar.xz Source: https://www.nano-editor.org/dist/latest/%{name}-%{version}.tar.xz
@ -26,6 +33,7 @@ Conflicts: filesystem < 3
%description %description
GNU nano is a small and friendly text editor. GNU nano is a small and friendly text editor.
%if %{with default_editor}
%package default-editor %package default-editor
Summary: Sets GNU nano as the default editor Summary: Sets GNU nano as the default editor
Requires: nano = %{version}-%{release} Requires: nano = %{version}-%{release}
@ -37,6 +45,7 @@ BuildArch: noarch
%description default-editor %description default-editor
This package ensures the EDITOR shell variable This package ensures the EDITOR shell variable
is set in common shells to GNU nano. is set in common shells to GNU nano.
%endif
%prep %prep
%autosetup -S git %autosetup -S git
@ -73,10 +82,12 @@ rm -rf %{buildroot}%{_datadir}/nano/extra
%find_lang %{name} %find_lang %{name}
%if %{with default_editor}
# install nano-default-editor snippets # install nano-default-editor snippets
install -Dpm 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/profile.d/%{basename:%{S:11}} install -Dpm 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/profile.d/%{basename:%{S:11}}
install -Dpm 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/profile.d/%{basename:%{S:12}} install -Dpm 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/profile.d/%{basename:%{S:12}}
install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basename:%{S:13}} install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basename:%{S:13}}
%endif
%files -f build/%{name}.lang %files -f build/%{name}.lang
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO %doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO
@ -88,14 +99,19 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen
%{_infodir}/nano.info* %{_infodir}/nano.info*
%{_datadir}/nano %{_datadir}/nano
%if %{with default_editor}
%files default-editor %files default-editor
%dir %{_sysconfdir}/profile.d %dir %{_sysconfdir}/profile.d
%config(noreplace) %{_sysconfdir}/profile.d/nano-default-editor.* %config(noreplace) %{_sysconfdir}/profile.d/nano-default-editor.*
%dir %{_datadir}/fish/vendor_conf.d %dir %{_datadir}/fish/vendor_conf.d
%{_datadir}/fish/vendor_conf.d/nano-default-editor.fish %{_datadir}/fish/vendor_conf.d/nano-default-editor.fish
%endif
%changelog %changelog
* Wed May 05 2021 Kamil Dudka <kdudka@redhat.com> - 5.6.1-3
- build nano-default-editor by default only on fedora
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.6.1-2 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.6.1-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937