File ne.spec of Package ne

#
# spec file for package ne
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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/
#


Name:           ne
Version:        3.0.1
Release:        0
Summary:        The nice editor
License:        GPL-2.0-or-later
Url:            http://ne.di.unimi.it/
Source:         http://ne.di.unimi.it/ne-%{version}.tar.gz
# PATCH-FIX-UPSTREAM ne-fix-about.patch sebastiano.vigna@gmail.com -- Fixed missing screen update after ABOUT.
Patch0:         %{name}-fix-about.patch
# PATCH-FIX-OPENSUSE ne-make.patch sor.alexei@meowr.ru -- Fixup Makefile's.
Patch1:         %{name}-make.patch
BuildRequires:  gcc
BuildRequires:  glibc-devel
BuildRequires:  make
BuildRequires:  pkgconfig(ncurses)
BuildRequires:  perl
BuildRequires:  texinfo
Suggests:       %{name}-doc = %{version}

%description
ne is a free text editor that runs on (hopefully almost) any
UNIX-like machine. ne is easy to use for the beginner, but powerful
and fully configurable for the wizard, and most sparing in its
resource usage.

%package doc
Summary:        More documentation for ne
Requires:       %{name} = %{version}
BuildArch:      noarch

%description doc
More documentation for ne (PDF guide, info, ...).

%prep
%autosetup -p1

%build
%make_build \
  OPTS="%{optflags} -std=c99"       \
  PREFIX=%{_prefix}                 \
  NE_GLOBAL_DIR=%{_datadir}/%{name} \
  NE_TERMCAP=1                      \
  NE_ANSI=1                         \
  NE_DEBUG=""

%install
%make_install \
  PREFIX=%{_prefix}         \
  DOCDIR=%{_docdir}/%{name} \
  NE_GLOBAL_DIR=%{_datadir}

%post doc
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info{?ext_info}

%postun doc
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{?ext_info}

%files
%license COPYING
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_mandir}/man?/%{name}.?%{?ext_man}

%files doc
%doc %{_docdir}/%{name}
%{_infodir}/%{name}.info%{?ext_info}

%changelog
openSUSE Build Service is sponsored by