SHA256
1
0
forked from pool/nano
nano/nano.spec
Martin Pluskal b1044dc358 - Update to version 6.3:
* For multiline regexes, text is now colored as soon a start
    match is found, also when there is no end match at all.
  * The colorizing of any line is stopped after two thousand bytes
    to avoid frustrating delays.
  * When environment variable NO_COLOR is set, the two default
    colors (yellow for the spotlight, red for error messages) are
    suppressed when no interface colors are specified in a nanorc
    file.
  * Full justification and piping the whole buffer through a
    command now keep the cursor at the same line number.
  * Utility 'xsel' can be used to copy a marked region to the
    system's clipboard.  See doc/sample.nanorc for an example.

OBS-URL: https://build.opensuse.org/package/show/editors/nano?expand=0&rev=159
2022-04-29 07:11:32 +00:00

93 lines
2.8 KiB
RPMSpec

#
# spec file for package nano
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _version 6
Name: nano
Version: 6.3
Release: 0
Summary: Pico editor clone with enhancements
License: GPL-3.0-or-later
Group: Productivity/Text/Editors
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
BuildRequires: pkgconfig
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(zlib)
%description
GNU nano is a small and friendly text editor. It aims to emulate
the Pico text editor while also offering a few enhancements.
%lang_package
%prep
%setup -q
%build
%configure \
--disable-rpath \
--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 "%{_datadir}/nano/\*.nanorc"\)|\1|' \
%{SOURCE3} doc/sample.nanorc > ./nanorc
%install
%make_install
# Move documents to a proper directory.
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
%files
%license COPYING COPYING.DOC
%doc AUTHORS ChangeLog* IMPROVEMENTS NEWS README THANKS TODO doc/sample.nanorc
%doc %{_docdir}/nano/
%{_bindir}/nano
%{_bindir}/rnano
%config(noreplace) %{_sysconfdir}/nanorc
%{_datadir}/nano/
%{_infodir}/nano.info%{?ext_info}
%{_mandir}/man1/nano.1%{?ext_man}
%{_mandir}/man1/rnano.1%{?ext_man}
%{_mandir}/man5/nanorc.5%{?ext_man}
%files lang -f %{name}.lang
%license COPYING COPYING.DOC
%changelog