SHA256
1
0
forked from pool/nano
nano/nano.spec

110 lines
3.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package nano
#
# Copyright (c) 2011 SUSE LINUX Products 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/
#
# norootforbuild
Name: nano
Version: 2.3.0
Release: 1
Summary: Pico Editor Clone with Enhancements
License: GPLv3+ and (GFDL or GPLv3+)
Url: http://www.nano-editor.org/
Group: Productivity/Editors/Other
# http://www.nano-editor.org/dist/v2.3/%{name}-%{version}.tar.gz
Source0: %{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE no-build-date.patch cristian.rodriguez@opensuse.org -- Do not provide build dates in binaries
Patch0: nano-no-build-date.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: file-devel
BuildRequires: ncurses-devel
Requires(post): info
Requires(preun): info
Recommends: %{name}-lang = %{version}
%description
GNU nano is a small and friendly text editor. It aims to emulate the
Pico text editor while also offering a few enhancements.
Authors:
--------
Chris Allegretta <chrisa@asty.org>
David Lawrence Ramsey <pooka109@gmail.com>
Jordi Mallach <jordi@gnu.org>
Adam Rogoyski <rogoyski@cs.utexas.edu>
Robert Siemborski <rjs3@andrew.cmu.edu>
Rocco Corsi <rocco.corsi@sympatico.ca>
David Benbennick <dbenbenn@math.cornell.edu>
Mike Frysinger <vapier@gentoo.org>
%lang_package
%prep
%setup -q
%patch0
%build
%configure --disable-rpath --enable-utf8
%__make %{?_smp_mflags}
%install
%makeinstall
# Remove doc files from /usr/share/nano (they should be in defaultdocdir)
rm -rf %{buildroot}%{_datadir}/nano/man-html/
# Manually install the doc files in order to easily split them between the main and lang package
install -dp -m 0755 %{buildroot}%{_defaultdocdir}/nano
install -p -m 0644 AUTHORS BUGS COPYING COPYING.DOC ChangeLog ChangeLog.pre-2.1 NEWS README THANKS TODO UPGRADE %{buildroot}%{_defaultdocdir}/nano/
install -p -m 0644 doc/faq.html doc/nanorc.sample %{buildroot}%{_defaultdocdir}/nano/
install -dp -m 0755 %{buildroot}%{_defaultdocdir}/nano/man-html/fr
install -p -m 0644 doc/man/*.html %{buildroot}%{_defaultdocdir}/nano/man-html/
install -p -m 0644 doc/man/fr/*.html %{buildroot}%{_defaultdocdir}/nano/man-html/fr/
%find_lang %{name} --with-man --all-name
%clean
%__rm -rf %{buildroot}
%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 %{_defaultdocdir}/nano/
%exclude %{_defaultdocdir}/nano/man-html/fr/
%{_bindir}/nano
%{_bindir}/rnano
%doc %{_infodir}/nano.info%{ext_info}
%doc %{_mandir}/man1/nano.1%{ext_man}
%doc %{_mandir}/man1/rnano.1%{ext_man}
%doc %{_mandir}/man5/nanorc.5%{ext_man}
%{_datadir}/nano/
%files lang -f %{name}.lang
%defattr(-,root,root,-)
%doc %{_defaultdocdir}/nano/man-html/fr/
%changelog