File pocketsphinx.spec of Package pocketsphinx
#
# spec file for package pocketsphinx
#
# Copyright (c) 2017 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/
#
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
Name: pocketsphinx
%define realver 5prealpha.1655.e1bd6621
Version: %(echo '%realver' | sed 's|prealpha\.|~git|')
Release: 0
Summary: Speech recognizer library written in C
License: BSD-2-Clause
Group: Productivity/Office/Other
URL: https://cmusphinx.github.io/
Source: pocketsphinx-%{realver}.tar.xz
Patch0: 0001-Fixed-pkg-config-paths-and-version.patch
Patch1: 0002-Fix-missing-sphinxbase-include.patch
Patch2: 0003-Compile-with-PIC.patch
Patch3: 0004-Added-debug-symbols-to-static-library.patch
BuildRequires: pkgconfig(alsa)
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: fdupes
%description
Pocketsphinx is a version of the open-source CMU Sphinx II speech
recognition system which is able to recognize speech in real-time.
%package devel
Summary: Development files for pocketsphinx, a speech recognizer library
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: pkgconfig(alsa)
Conflicts: sphinxbase-devel
Conflicts: pocketsphinx-devel
BuildRequires: -post-build-checks
%description devel
CMU Sphinx toolkit has a number of packages for different tasks and
applications. Pocketsphinx is a version of the open-source CMU Sphinx
II speech recognition system which is able to recognize speech in
real-time.
This is the development package for pocketsphinx.
%prep
%autosetup -p1 -n pocketsphinx
%build
%cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
%cmake_build
%install
%cmake_install
%fdupes %{buildroot}
find %{buildroot} -type f -name "*.la" -delete -print
rm -rfv %{buildroot}/usr/share/pocketsphinx/swig/
%check
%__ctest
%files
%doc AUTHORS README.md NEWS
%license LICENSE
%{_bindir}/sphinx_pitch
%{_bindir}/sphinx_lm_eval
%{_bindir}/sphinx_lm_convert
%{_bindir}/sphinx_jsgf2fsg
%{_bindir}/sphinx_fe
%{_bindir}/sphinx_cepview
%{_bindir}/pocketsphinx_mdef_convert
%{_bindir}/pocketsphinx_batch
%{_mandir}/man1/*sphinx_*.1*
%dir %{_datadir}/pocketsphinx/
%dir %{_datadir}/pocketsphinx/model
%{_datadir}/pocketsphinx/model/en-us
%files devel
%{_includedir}/pocketsphinx.h
%{_includedir}/sphinxbase
%{_includedir}/pocketsphinx
%{_libdir}/*.a
%{_libdir}/pkgconfig/pocketsphinx.pc
%changelog