File simon.spec of Package simon4
#
# spec file for package simon
#
# Copyright (c) 2013 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/
#
Name: simon
Version: 0.4.1
Release: 0
License: GPL-2.0
Summary: Open source speech recognition
Url: http://www.simon-listens.org
Group: System/GUI/KDE
#PATCH-FEATURE-UPSTREAM lib.diff installs in lib64 on 64bit machines
Patch0: lib.diff
#PATCH-FEATURE-UPSTREAM so.diff creates shared versions for some libs
Patch1: so.diff
#PATCH-FEATURE-UPSTREAM desktop.diff uses an existing icon for sscd.desktop
Patch2: desktop.diff
Source0: http://download.kde.org/stable/simon/%{version}/src/%{name}-%{version}.tar.bz2
BuildRequires: alsa-devel
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: libkde4-devel
BuildRequires: qaccessibilityclient-devel
BuildRequires: libkdepimlibs4-devel > 4.5.60
BuildRequires: libsamplerate-devel
# fails to build with opencv 4.x
#if 0%{?suse_version} > 1500
#BuildRequires: opencv3-devel
#else
BuildRequires: pkgconfig(opencv) < 4.0.0
#endif
BuildRequires: pkg-config
BuildRequires: pocketsphinx-devel
BuildRequires: portaudio-devel
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300
BuildRequires: qwt6-qt4-devel
%else
BuildRequires: qwt6-devel
%endif
BuildRequires: sphinxbase-devel
BuildRequires: update-desktop-files
Requires: julius
Requires: kdebase4-runtime >= %_kde_platform_version
Requires: sox
Obsoletes: simon < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%kde4_runtime_requires
%kde4_akonadi_requires
%description
The project provides a ready-to-use interface for the julius CSR engine for a handicapped child which is not able to use the keyboard well. It integrates into X11 and Windows
http://simon-listens.blogspot.co.at/2012/12/simon-040.html
%package devel
License: GPL-2.0
Summary: Open source speech recognition: Development files
Url: http://www.simon-listens.org
Group: Development/Languages/C and C++
Requires: %{name} = %{version}
%description devel
The project provides a ready-to-use interface for the julius CSR engine for a handicapped child which is not able to use the keyboard well. It integrates into X11 and Windows
%package doc
License: GPL-2.0
Summary: Open source speech recognition: Documentation
Url: http://www.simon-listens.org
Group: Documentation/HTML
Requires: %{name} = %{version}
%description doc
The project provides a ready-to-use interface for the julius CSR engine for a handicapped child which is not able to use the keyboard well. It integrates into X11 and Windows
%package libsimon4
License: GPL-2.0
Summary: Open source speech recognition: Libraries
Url: http://www.simon-listens.org
Group: System/GUI/KDE
Requires: %{name} = %{version}
%kde4_runtime_requires
%description libsimon4
The project provides a ready-to-use interface for the julius CSR engine for a handicapped child which is not able to use the keyboard well. It integrates into X11 and Windows
%lang_package
%prep
%autosetup -p1
%build
%cmake_kde4 -d builddir -- -DUSE_PLASMA=On
%make_jobs
%install
pushd builddir
%make_install
popd
%fdupes -s %{buildroot}
%kde_post_install
for i in simon afaras ksimond plasma_applet_simonoid sam simonactivewindow simonaicommand simonakonadicommand simonatspicommand simoncalculatorcommand simoncompositecommand simond simondbuscommand simondbuscondition simondesktopgridcommand simondialogcommand simondictationcommand simonexecutablecommand simonfacedetectioncondition simonfilecontent simonfiltercommand simoninputnumbercommand simonjsoncommand simonkeyboardcommand simonlib simonlipdetectioncondition simonlistcommand simonorconditionassociation simonplacecommand simonprocessopenedcondition simonpronunciationtrainingcommand simonrecognizercommand simonshortcutcommand simontemplatecommand simontextmacrocommand ssc ; do
%find_lang $i %{name}.lang
done
rm -f %buildroot%_kde4_appsdir/simon.log
rm -f %buildroot%_kde4_appsdir/simon/model/prompts
%post libsimon4 -p /sbin/ldconfig
%postun libsimon4 -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS Changelog COPYING.LIB README.txt
%dir %_kde4_iconsdir/hicolor/24x24
%dir %_kde4_iconsdir/hicolor/24x24/apps
%dir %_kde4_iconsdir/hicolor/192x192
%dir %_kde4_iconsdir/hicolor/192x192/apps
%_kde4_bindir/*
%_kde4_modulesdir/*.so
%_kde4_appsdir/*.xml
%_kde4_configdir/simonbasemodels.knsrc
%_kde4_applicationsdir/*.desktop
%_datadir/autostart/*.desktop
%_kde4_iconsdir/hicolor/*/apps/*.png
%_kde4_appsdir/*.rc
%_kde4_appsdir/ai/
%_kde4_appsdir/sam/
%_kde4_appsdir/simon/
%_kde4_appsdir/simond/
%_kde4_appsdir/simoninfo/
%_kde4_appsdir/ssc/
%_kde4_configkcfgdir/*
%_kde4_configdir/*
%_kde4_servicesdir/*.desktop
%_kde4_servicetypesdir/*.desktop
%_datadir/sscd/
%exclude %_kde4_htmldir/
%files libsimon4
%defattr(-,root,root)
%_kde4_libdir/*.so.*
%files devel
%defattr(-,root,root)
%_kde4_libdir/*.so
%_kde4_includedir/simon/
%_kde4_includedir/simond/
%_kde4_includedir/ssc/
%files doc
%defattr(-,root,root)
%_kde4_htmldir/en
%_kde4_htmldir/ca
%_kde4_htmldir/it
%_kde4_htmldir/de
%_kde4_htmldir/nl
%_kde4_htmldir/pt
%_kde4_htmldir/pt_BR
%_kde4_htmldir/sv
%_kde4_htmldir/uk
%changelog