File gperf.spec of Package gperf-v31

Name:           gperf
Version:        3.1
Release:        7
Summary:        A hash function generator
License:        GPLv3+
URL:            http://www.gnu.org/software/gperf/
Source:         %{name}-%{version}.tar.gz

BuildRequires:  gcc gcc-c++
BuildRequires:  autoconf automake libtool python3

%description
GNU gperf is a perfect hash function generator. For a given list of strings, it
produces a hash function and hash table, in form of C or C++ code, for looking up
a value depending on the input string. The hash function is perfect, which means
that the hash table has no collisions, and the hash table lookup needs a single
string comparison only.

%package help
Summary: Help documents
BuildArch: noarch
%description help
Help documents.

%prep
%autosetup -n %{name}-%{version}

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

%configure
%make_build

%install
%make_install

%files
%doc README NEWS doc/*.{html,pdf} COPYING
%{_bindir}/%{name}
%exclude %{_datadir}/doc

%files help
%{_mandir}/man1/gperf.1*
%{_infodir}/gperf.info*
%exclude %{_mandir}/{dvi,html}

%changelog
* Mon Dec 9 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.1-7
- Package init
openSUSE Build Service is sponsored by