SHA256
1
0
forked from pool/nano
Dominique Leuenberger 2021-01-03 20:26:35 +00:00 committed by Git OBS Bridge
commit 9cb53c9559
3 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Dec 31 12:40:05 UTC 2020 - Neal Gompa <ngompa13@gmail.com>
- Install a useful default nanorc configuration
- Enable useful extra definitions for syntax highlighting
-------------------------------------------------------------------
Thu Dec 3 07:35:47 UTC 2020 - Andreas Stieger <andreas.stieger@gmx.de>

View File

@ -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}

6
nanorc Normal file
View File

@ -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.