File nano.spec of Package nano-v295

Name:		nano
Version:	2.9.5
Release:	1
Summary:	Nano is now part of Apache CouchDB
License:	GPLv3+
URL:		https://www.nano-editor.org
Source0:	%{name}-%{version}.tar.gz

BuildRequires:	file-devel gettext-devel gcc git ncurses-devel sed texinfo groff
BuildRequires:  autoconf automake libtool python3
Conflicts:	filesystem < 3

%description
Nano is now part of Apache CouchDB.

%package help
Summary:	Help documents for nano
BuildArch:	noarch

%description help
Help documents for nano.

%prep
%autosetup


%build
export CFLAGS="%{optflags} -Wno-error -std=gnu11"
export CXXFLAGS="%{optflags} -Wno-error"

install -d build
cd build
%global _configure ../configure
%configure
%make_build

sed -e 's/# set nowrap/set nowrap/' \
    -e 's/^#.*set speller.*$/set speller "hunspell"/' \
    -e 's|^# \(include "/usr/share/nano/\*.nanorc"\)|\1|' \

%install
cd build
%make_install
rm -rf %{buildroot}%{_infodir}/dir
rm -rf %{buildroot}%{_docdir}/nano/{nano,nano.1,nanorc.5,rnano.1}.html
rm -f %{buildroot}/usr/share/doc/nano/faq.html %{buildroot}/usr/share/doc/nano/nano.html

install -d %{buildroot}%{_sysconfdir}

%find_lang %{name}

%files -f build/%{name}.lang
%defattr(-,root,root)
%doc AUTHORS
%license COPYING

%{_bindir}/*
%{_datadir}/nano
%{_infodir}/nano.info*

%files help
%defattr(-,root,root)
%doc ChangeLog INSTALL NEWS README THANKS TODO
%doc build/doc/sample.nanorc
%doc doc/nano.html
%{_mandir}/man*/*

%changelog
* Fri Jan 17 2020 Lei Zhang <ricky.z@huawei.com> - 4.5-2
- Remove useless nanorc config file

* Tue Nov 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.5-1
- Package init
openSUSE Build Service is sponsored by