File jovie.spec of Package jovie

#
# spec file for package jovie
#
# 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/
#


Name:           jovie
Version:        17.08.3
Release:        0
%define kf5_version 5.26.0
# Latest stable Applications (e.g. 17.08 in KA, but 17.11.80 in KUA)
%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
Summary:        KDE Text-to-Speech subsystem
License:        GPL-2.0+
Group:          System/GUI/KDE
Url:            http://www.kde.org
Source0:        jovie-%{version}.tar.xz
BuildRequires:  alsa-devel
BuildRequires:  libkde4-devel
BuildRequires:  libspeechd-devel
BuildRequires:  oxygen-icon-theme-large
BuildRequires:  xz
Provides:       kde4-kttsd = 4.3.0
Obsoletes:      kde4-kttsd < 4.3.0
Provides:       kttsd = 4.4.85
Obsoletes:      kttsd < 4.4.85
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{kde4_runtime_requires}

%description
Jovie KDE Text-to-Speech (TTS) is a subsystem within the KDE desktop
for conversion of text to audible speech.
It can be used from any KDE application that uses the kdelibs
TTS interface.

%prep
%setup -q

%build
  %cmake_kde4 -d build
  %make_jobs

%install
  cd build
  %kde4_makeinstall
  %kde_post_install
  for i in {16,22,32,48,64,128}; do
     mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
     cp %{_datadir}/icons/oxygen/${i}x${i}/apps/preferences-desktop-text-to-speech.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/ \
     || cp %{_datadir}/icons/oxygen/base/${i}x${i}/apps/preferences-desktop-text-to-speech.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/
  done

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/org.kde.jovie.appdata.xml
%{_kde4_applicationsdir}/org.kde.jovie.desktop
%{_kde4_appsdir}/jovie/
%{_kde4_bindir}/jovie
%{_kde4_htmldir}/en/jovie/
%{_kde4_iconsdir}/hicolor/*/*/*.png
%{_kde4_libdir}/libkttsd.so*
%{_kde4_modulesdir}/*.so
%{_kde4_servicesdir}/*.desktop
%{_kde4_servicetypesdir}/*.desktop

%changelog
openSUSE Build Service is sponsored by