File mingw64-libqt5-qtspeech.spec of Package mingw64-libqt5-qtspeech
#
# spec file for package mingw64-libqt5-qtspeech
#
# 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/
#
# TODO fix in macros.mingw64-qt5
%global _mingw64_libqt5_plugindir %{_mingw64_libqt5_libdir}/qt5/plugins
%global qt_module qtspeech
# first two digits of version
%global release_version %(echo %version | awk -F. '{print $1"."$2}')
%if 0%{?snapshot_date}
%global source_folder qt-%{qt_module}
%else
%global source_folder %{qt_module}-everywhere-src-%{version}%{?pre:-%pre}
%endif
%define qt5_snapshot 1
%define qt5_speechd 0
%define qt5_examples 0
%define libname libQt5TextToSpeech5
%define base_name libqt5
%define _name libqt5-qtspeech
Name: mingw64-%{_name}
Version: 5.15.14+kde0
Release: 0
Summary: Qt 5 Speech Addon
License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only
Group: Development/Libraries/X11
Url: https://www.qt.io
Source: %{source_folder}.tar.xz
BuildRequires: mingw64-libQt5Core-private-headers-devel
BuildRequires: mingw64(cmake:Qt5Widgets)
%if %qt5_speechd
BuildRequires: mingw64-libspeechd-devel
%endif
BuildRequires: xz
%if %{qt5_snapshot}
#to create the forwarding headers
BuildRequires: perl
%endif
%_mingw64_package_header_debug
BuildArch: noarch
%description
Qt is a set of libraries for developing applications.
The module enables a Qt application to support accessibility features
such as text-to-speech, which is useful for end-users who are visually
challenged or cannot access the application for whatever reason.
%_mingw64_debug_package
%prep
%setup -q -n %{source_folder}
%if %{suse_version} < 1330
# work around wrong include directory specification in speech-dispatcher's pkgconfig file in Leap 42.x
sed -i "s|libspeechd.h|speech-dispatcher/libspeechd.h|" src/plugins/tts/speechdispatcher/qtexttospeech_speechd.*
%endif
%package -n mingw64-%{libname}
Summary: Qt 5 Speech Addon
Group: Development/Libraries/X11
%description -n mingw64-%{libname}
Qt is a set of libraries for developing applications.
The module enables a Qt application to support accessibility features
such as text-to-speech, which is useful for end-users who are visually
challenged or cannot access the application for whatever reason.
%package devel
Summary: Development files for the Qt5 Speech library
Group: Development/Libraries/X11
Requires: mingw64-%{libname} = %{version}
%description devel
You need this package if you want to compile programs with qtspeech.
%if %qt5_examples
%package examples
Summary: Qt5 Speech examples
Group: Development/Libraries/X11
%description examples
Examples for the libqt5-qtspeech module.
%endif
%build
%if %{qt5_snapshot}
#force the configure script to generate the forwarding headers (it checks whether .git directory exists)
mkdir .git
%endif
%_mingw64_qmake5
%make_jobs
%install
%_mingw64_qmake5_install
# kill .la files
rm -f %{buildroot}%{_mingw64_libqt5_libdir}/lib*.la
%files -n mingw64-%{libname}
%doc LICENSE.*
%{_mingw64_libqt5_bindir}/libQt5TextToSpeech.dll
%dir %{_mingw64_libqt5_plugindir}/texttospeech/
%{_mingw64_libqt5_plugindir}/texttospeech/*.dll
%files devel
%{_mingw64_libqt5_datadir}/mkspecs/modules/qt_lib_*.pri
%{_mingw64_libqt5_includedir}/Qt*
%{_mingw64_libqt5_libdir}/cmake/Qt5TextToSpeech/
%{_mingw64_libqt5_libdir}/Qt5TextToSpeech.prl
%{_mingw64_libqt5_libdir}/libQt5TextToSpeech.dll.a
%{_mingw64_libqt5_libdir}/pkgconfig/Qt5TextToSpeech.pc
%if %qt5_examples
%files examples
%{_mingw64_libqt5_examplesdir}/
%endif
%changelog