Disable espeak support

This commit is contained in:
Ondřej Lysoněk 2018-03-09 14:30:37 +01:00
parent 6a8140ffb6
commit 567a71eda2

View File

@ -21,7 +21,6 @@ BuildRequires: alsa-lib-devel
BuildRequires: desktop-file-utils
BuildRequires: dotconf-devel
BuildRequires: espeak-ng-devel
BuildRequires: espeak-devel
BuildRequires: flite-devel
Buildrequires: glib2-devel
Buildrequires: intltool
@ -86,17 +85,10 @@ Requires: python3-speechd = %{version}-%{release}
%description utils
Various utilities for speechd
%package espeak
Summary: Speech Dispatcher espeak module
Requires: %{name}%{_isa} = %{version}-%{release}
Obsoletes: speech-dispatcher < 0.8.1-2
%description espeak
This package contains the espeak output module for Speech Dispatcher.
%package espeak-ng
Summary: Speech Dispatcher espeak-ng module
Requires: %{name}%{_isa} = %{version}-%{release}
Obsoletes: speech-dispatcher-espeak < 0.8.8-5
%description espeak-ng
This package contains the espeak-ng output module for Speech Dispatcher.
@ -139,6 +131,7 @@ tar xf %{SOURCE1}
--with-alsa --with-pulse --with-libao \
--without-oss --without-nas \
--with-flite \
--without-espeak \
--with-espeak-ng \
--sysconfdir=%{_sysconfdir} --with-default-audio-method=pulse
@ -175,6 +168,26 @@ desktop-file-validate %{buildroot}/%{_datadir}/speech-dispatcher/conf/desktop/sp
# enable pulseaudio as default with a fallback to alsa
sed 's/# AudioOutputMethod "pulse,alsa"/AudioOutputMethod "pulse,alsa"/' %{buildroot}%{_sysconfdir}/speech-dispatcher/speechd.conf
%if 0%{?fedora}
%pre espeak-ng
espeak_ng_conf=%{_sysconfdir}/speech-dispatcher/modules/espeak-ng.conf
if [ 0$1 -eq 1 -a ! -f $espeak_ng_conf ]; then
espeak_conf=%{_sysconfdir}/speech-dispatcher/modules/espeak.conf
if [ -f $espeak_conf ]; then
cp $espeak_conf $espeak_ng_conf || :
fi
speechd_conf=%{_sysconfdir}/speech-dispatcher/speechd.conf
if [ -f $speechd_conf ]; then
sed -i.bak-espeak -r \
-e 's/^(\s*AddModule\s+)("?)espeak\2\s+("?)sd_espeak\3\s+("?)espeak.conf\4(\s*(#.*)?)$/\1"espeak-ng" "sd_espeak-ng" "espeak-ng.conf"\5/' \
-e 's/^(\s*AddModule\s+("?)[^"]*\2\s+)("?)sd_espeak\3(\s+("?)[^"]*\5(\s*(#.*)?))$/\1"sd_espeak-ng"\4/' \
-e 's/^(\s*DefaultModule\s+)("?)espeak\2(\s*(#.*)?)$/\1espeak-ng\3/' \
-e 's/^(\s*LanguageDefaultModule\s+("?)[^"]*\2\s+)("?)espeak\3(\s*(#.*)?)$/\1"espeak-ng"\4/' \
$speechd_conf || :
fi
fi
%endif
%post
/sbin/ldconfig
%systemd_post speech-dispatcherd.service
@ -238,10 +251,6 @@ fi
%{_bindir}/spd-say
%{_bindir}/spdsend
%files espeak
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/espeak.conf
%{_libdir}/speech-dispatcher-modules/sd_espeak
%files espeak-ng
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/espeak-ng.conf
%{_libdir}/speech-dispatcher-modules/sd_espeak-ng
@ -259,7 +268,7 @@ fi
%changelog
* Thu Mar 08 2018 Ondřej Lysoněk <olysonek@redhat.com> - 0.8.8-5
- Make espeak-ng the default output module
- Make espeak-ng the default output module, drop the espeak output module
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild