| |
@@ -1,12 +1,17 @@
|
| |
Summary: A small text editor
|
| |
Name: nano
|
| |
Version: 4.9.3
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
License: GPLv3+
|
| |
URL: https://www.nano-editor.org
|
| |
Source: https://www.nano-editor.org/dist/latest/%{name}-%{version}.tar.xz
|
| |
Source2: nanorc
|
| |
|
| |
+ # Shell snippets for default-editor setup
|
| |
+ Source11: nano-default-editor.sh
|
| |
+ Source12: nano-default-editor.csh
|
| |
+ Source13: nano-default-editor.fish
|
| |
+
|
| |
BuildRequires: file-devel
|
| |
BuildRequires: gettext-devel
|
| |
BuildRequires: gcc
|
| |
@@ -20,6 +25,15 @@
|
| |
%description
|
| |
GNU nano is a small and friendly text editor.
|
| |
|
| |
+ %package default-editor
|
| |
+ Summary: Sets GNU nano as the default editor
|
| |
+ Requires: nano = %{version}-%{release}
|
| |
+ BuildArch: noarch
|
| |
+
|
| |
+ %description default-editor
|
| |
+ This package ensures the EDITOR shell variable
|
| |
+ is set in common shells to GNU nano.
|
| |
+
|
| |
%prep
|
| |
%autosetup -S git
|
| |
|
| |
@@ -53,6 +67,11 @@
|
| |
|
| |
%find_lang %{name}
|
| |
|
| |
+ # install nano-default-editor snippets
|
| |
+ 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 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basename:%{S:13}}
|
| |
+
|
| |
%files -f build/%{name}.lang
|
| |
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO
|
| |
%doc build/doc/sample.nanorc
|
| |
@@ -63,7 +82,17 @@
|
| |
%{_infodir}/nano.info*
|
| |
%{_datadir}/nano
|
| |
|
| |
+ %files default-editor
|
| |
+ %dir %{_sysconfdir}/profile.d
|
| |
+ %config(noreplace) %{_sysconfdir}/profile.d/nano-default-editor.*
|
| |
+ %dir %{_datadir}/fish/vendor_conf.d
|
| |
+ %{_datadir}/fish/vendor_conf.d/nano-default-editor.fish
|
| |
+
|
| |
+
|
| |
%changelog
|
| |
+ * Thu Jul 16 2020 Neal Gompa <ngompa13@gmail.com> - 4.9.3-2
|
| |
+ - Add default-editor subpackage (#1854444)
|
| |
+
|
| |
* Mon May 25 2020 Kamil Dudka <kdudka@redhat.com> - 4.9.3-1
|
| |
- new upstream release
|
| |
|
| |
Reference: https://fedoraproject.org/wiki/Changes/UseNanoByDefault
(cc: @chrismurphy, @catanzaro)