SHA256
1
0
forked from pool/nano
nano/nano.spec
Martin Pluskal 595bf57ba6 - Update to version 2.6.0:
* fixes more than fifty little bugs -- and some of them not so 
    little.
  * It improves moving about in the file browser, corrects failings 
    of the internal spell checker, adds a new feature 
    (comment/uncomment lines, with default binding M-3), makes some 
    error messages clearer, shows more of a file when positionlog 
    is used and the cursor is near the end, displays all error
    messages at startup if there are multiple ones, does not 
    misinterpret keystrokes when typing very fast, is less eager 
    to trim the filename on narrow terminals, speeds up 
    case-insensitive searches, and allows to abort re-searches.

OBS-URL: https://build.opensuse.org/package/show/editors/nano?expand=0&rev=43
2016-06-18 12:57:05 +00:00

103 lines
2.9 KiB
RPMSpec

#
# spec file for package nano
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define _version 2.6
Name: nano
Version: 2.6.0
Release: 0
Summary: Pico editor clone with enhancements
License: GPL-3.0+
Group: Productivity/Editors/Other
Url: http://nano-editor.org/
Source0: http://nano-editor.org/dist/v%{_version}/%{name}-%{version}.tar.gz
Source1: http://nano-editor.org/dist/v%{_version}/%{name}-%{version}.tar.gz.asc
Source2: %{name}.keyring
BuildRequires: file-devel
BuildRequires: ncurses-devel
BuildRequires: pkg-config
BuildRequires: zlib-devel
Requires(post): info
Requires(preun): info
Recommends: %{name}-lang = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1230
BuildRequires: groff-full
%else
BuildRequires: groff
%endif
%if 0%{?suse_version} > 1140
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
%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
# Remove build time references so build-compare can do its work.
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" src/nano.c
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/nano.c
%build
%configure \
--disable-rpath \
--enable-utf8
make %{?_smp_mflags}
%install
%make_install
# Move documents to a proper directory.
mkdir -p %{buildroot}%{_docdir}/
mv -f %{buildroot}%{_datadir}/doc/%{name}/ %{buildroot}%{_docdir}/%{name}/
%find_lang %{name} --with-man --all-name
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{?ext_info}
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{?ext_info}
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog ChangeLog.pre-2.1 COPYING COPYING.DOC NEWS README THANKS TODO
%doc %{_docdir}/nano/
%exclude %{_docdir}/%{name}/*/
%{_bindir}/nano
%{_bindir}/rnano
%{_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
%defattr(-,root,root)
%doc %{_docdir}/%{name}/*/
%changelog