diff --git a/nano.changes b/nano.changes index 290b93f..13286c1 100644 --- a/nano.changes +++ b/nano.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 31 12:40:05 UTC 2020 - Neal Gompa + +- Install a useful default nanorc configuration +- Enable useful extra definitions for syntax highlighting + ------------------------------------------------------------------- Thu Dec 3 07:35:47 UTC 2020 - Andreas Stieger diff --git a/nano.spec b/nano.spec index d44e237..48f2901 100644 --- a/nano.spec +++ b/nano.spec @@ -27,6 +27,7 @@ URL: https://nano-editor.org/ Source0: https://nano-editor.org/dist/v%{_version}/%{name}-%{version}.tar.xz Source1: https://nano-editor.org/dist/v%{_version}/%{name}-%{version}.tar.xz.asc Source2: https://savannah.gnu.org/people/viewgpg.php?user_id=42085#/%{name}.keyring +Source3: nanorc BuildRequires: file-devel BuildRequires: groff-full BuildRequires: makeinfo @@ -51,6 +52,13 @@ the Pico text editor while also offering a few enhancements. --enable-utf8 %make_build +# generate default /etc/nanorc +# - set hunspell as the default spell-checker +# - enable syntax highlighting by default +sed -e 's/^#.*set speller.*$/set speller "hunspell"/' \ + -e 's|^# \(include "/usr/share/nano/\*.nanorc"\)|\1|' \ + %{SOURCE3} doc/sample.nanorc > ./nanorc + %install %make_install @@ -58,6 +66,13 @@ the Pico text editor while also offering a few enhancements. mkdir -p %{buildroot}%{_docdir}/ mv -f %{buildroot}%{_datadir}/doc/%{name}/ %{buildroot}%{_docdir}/%{name}/ +# install default /etc/nanorc +mkdir -p %{buildroot}%{_sysconfdir} +install -m 0644 ./nanorc %{buildroot}%{_sysconfdir}/nanorc + +# enable useful extra syntax highlighting files by default +mv %{buildroot}%{_datadir}/nano/extra/{ada,fortran,haskell,spec}.* %{buildroot}%{_datadir}/nano + %find_lang %{name} --with-man --all-name %post @@ -72,6 +87,7 @@ mv -f %{buildroot}%{_datadir}/doc/%{name}/ %{buildroot}%{_docdir}/%{name}/ %doc %{_docdir}/nano/ %{_bindir}/nano %{_bindir}/rnano +%config(noreplace) %{_sysconfdir}/nanorc %{_datadir}/nano/ %{_infodir}/nano.info%{?ext_info} %{_mandir}/man1/nano.1%{?ext_man} diff --git a/nanorc b/nanorc new file mode 100644 index 0000000..6a1736d --- /dev/null +++ b/nanorc @@ -0,0 +1,6 @@ +## This is a system-wide configuration file for the nano editor. +## +## Each user can save his own configuration to ~/.nanorc +## +## See the nanorc(5) man page for details. +