Package init
This commit is contained in:
parent
1fb61d762c
commit
75b2e914ab
25
0001-Make-espeak-ng-the-default-output-module.patch
Normal file
25
0001-Make-espeak-ng-the-default-output-module.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From b4400c86b7481cd8ffd6d1ae4dc62d0be29e1e30 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
|
||||
Date: Fri, 9 Mar 2018 14:13:47 +0100
|
||||
Subject: [PATCH] Make espeak-ng the default output module
|
||||
|
||||
---
|
||||
config/speechd.conf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config/speechd.conf b/config/speechd.conf
|
||||
index 140de3a..f99e3ce 100644
|
||||
--- a/config/speechd.conf
|
||||
+++ b/config/speechd.conf
|
||||
@@ -240,7 +240,7 @@ DefaultVolume 100
|
||||
# The DefaultModule selects which output module is the default. You
|
||||
# must use one of the names of the modules loaded with AddModule.
|
||||
|
||||
-DefaultModule espeak
|
||||
+DefaultModule espeak-ng
|
||||
|
||||
# The LanguageDefaultModule selects which output modules are prefered
|
||||
# for specified languages.
|
||||
--
|
||||
2.14.3
|
||||
|
||||
45
0001-Remove-pyxdg-dependency.patch
Normal file
45
0001-Remove-pyxdg-dependency.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 5ede80b0713c75b21925203c3ef389c86cb69e6d Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Fri, 20 Jul 2018 15:04:48 +0200
|
||||
Subject: [PATCH] Remove pyxdg dependency
|
||||
|
||||
And use the same algorithm as GLib to determine the base user config
|
||||
directory (XDG_CONFIG_HOME, then ~/.config then /tmp/$USERNAME/.config)
|
||||
---
|
||||
src/api/python/speechd_config/config.py.in | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/api/python/speechd_config/config.py.in b/src/api/python/speechd_config/config.py.in
|
||||
index ccf8803..e8393e5 100644
|
||||
--- a/src/api/python/speechd_config/config.py.in
|
||||
+++ b/src/api/python/speechd_config/config.py.in
|
||||
@@ -30,8 +30,6 @@ import socket
|
||||
import sys
|
||||
import time
|
||||
|
||||
-from xdg import BaseDirectory
|
||||
-
|
||||
# Locale/gettext configuration
|
||||
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
@@ -167,7 +165,16 @@ class Tests:
|
||||
|
||||
def user_conf_dir(self):
|
||||
"""Return user configuration directory"""
|
||||
- return os.path.join(BaseDirectory.xdg_config_home, "speech-dispatcher")
|
||||
+ config_dir = os.environ['XDG_CONFIG_HOME']
|
||||
+ if not config_dir:
|
||||
+ home_dir = os.environ['HOME']
|
||||
+ if home_dir:
|
||||
+ config_dir = os.path.join(home_dir, ".config")
|
||||
+ else:
|
||||
+ tmpdir = os.environ['TMPDIR'] or "/tmp/"
|
||||
+ config_dir = os.path.join(tmpdir, os.getlogin(), ".config")
|
||||
+
|
||||
+ return os.path.join(config_dir, "speech-dispatcher")
|
||||
|
||||
def system_conf_dir(self):
|
||||
"""Determine system configuration directory"""
|
||||
--
|
||||
2.17.1
|
||||
|
||||
BIN
sound-icons-0.1.tar.gz
Normal file
BIN
sound-icons-0.1.tar.gz
Normal file
Binary file not shown.
BIN
speech-dispatcher-0.8.8.tar.gz
Normal file
BIN
speech-dispatcher-0.8.8.tar.gz
Normal file
Binary file not shown.
181
speech-dispatcher.spec
Normal file
181
speech-dispatcher.spec
Normal file
@ -0,0 +1,181 @@
|
||||
Name: speech-dispatcher
|
||||
Version: 0.8.8
|
||||
Release: 9
|
||||
Summary: Common high-level interface to speech synthesis
|
||||
License: GPLv2+ and GPLv2
|
||||
URL: http://devel.freebsoft.org/speechd
|
||||
Source0: http://www.freebsoft.org/pub/projects/speechd/speech-dispatcher-%{version}.tar.gz
|
||||
Source1: http://www.freebsoft.org/pub/projects/sound-icons/sound-icons-0.1.tar.gz
|
||||
Source2: speech-dispatcherd.service
|
||||
Patch0001: 0001-Make-espeak-ng-the-default-output-module.patch
|
||||
Patch0002: 0001-Remove-pyxdg-dependency.patch
|
||||
BuildRequires: alsa-lib-devel desktop-file-utils dotconf-devel espeak-ng-devel flite-devel
|
||||
BuildRequires: glib2-devel intltool libao-devel libtool-ltdl-devel libsndfile-devel
|
||||
BuildRequires: pulseaudio-libs-devel python3-devel python3-setuptools texinfo systemd git
|
||||
Provides: speech-dispatcher-utils = %{version}-%{release}
|
||||
Obsoletes: speech-dispatcher-utils < %{version}-%{release}
|
||||
Requires: python3-speechd = %{version}-%{release} speech-dispatcher-espeak-ng
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
%description
|
||||
Speech Dispatcher project provides a high-level device independent layer for
|
||||
access to speech synthesis through a simple, stable and well documented interface.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for speech-dispatcher
|
||||
License: GPLv2+
|
||||
Requires: speech-dispatcher = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The package contains libraries and header files for developing applications that
|
||||
use speech-dispatcher.
|
||||
|
||||
%package help
|
||||
Summary: Documentation for speech-dispatcher
|
||||
License: GPLv2+
|
||||
Requires: speech-dispatcher = %{version}-%{release}
|
||||
Requires(post): info
|
||||
Requires(preun):info
|
||||
Provides: speech-dispatcher-doc = %{version}-%{release}
|
||||
Obsoletes: speech-dispatcher-doc < %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description help
|
||||
Documentation for speech-dispatcher
|
||||
|
||||
%package espeak-ng
|
||||
Summary: Speech Dispatcher espeak-ng module
|
||||
Requires: speech-dispatcher = %{version}-%{release}
|
||||
Obsoletes: speech-dispatcher-espeak < 0.8.8-5
|
||||
|
||||
%description espeak-ng
|
||||
This package contains the espeak-ng output module for Speech Dispatcher.
|
||||
|
||||
%package festival
|
||||
Summary: Speech Dispatcher festival module
|
||||
Requires: speech-dispatcher = %{version}-%{release} festival-freebsoft-utils
|
||||
Obsoletes: speech-dispatcher < 0.8.1-2
|
||||
|
||||
%description festival
|
||||
This package contains the festival output module for Speech Dispatcher.
|
||||
|
||||
%package flite
|
||||
Summary: Speech Dispatcher flite module
|
||||
Requires: speech-dispatcher = %{version}-%{release}
|
||||
Obsoletes: speech-dispatcher < 0.8.1-2
|
||||
|
||||
%description flite
|
||||
This package contains the flite output module for Speech Dispatcher.
|
||||
|
||||
%package -n python3-speechd
|
||||
Summary: Python v3 Client API for speech-dispatcher
|
||||
License: GPLv2+
|
||||
Requires: speech-dispatcher = %{version}-%{release}
|
||||
|
||||
%description -n python3-speechd
|
||||
Python v3 module for speech-dispatcher
|
||||
|
||||
%prep
|
||||
%autosetup -n speech-dispatcher-%{version} -S git
|
||||
tar xf %{SOURCE1}
|
||||
%build
|
||||
%configure --with-alsa --with-pulse --with-libao --without-oss --without-nas --with-flite --without-espeak \
|
||||
--with-espeak-ng --sysconfdir=%{_sysconfdir} --with-default-audio-method=pulse
|
||||
%make_build V=1
|
||||
%install
|
||||
%make_install
|
||||
install -d %{buildroot}%{_unitdir}
|
||||
install -p -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/
|
||||
install -p -m 0644 sound-icons-0.1/* %{buildroot}%{_datadir}/sounds/speech-dispatcher/
|
||||
%find_lang speech-dispatcher
|
||||
%delete_la_and_a
|
||||
install -d %{buildroot}%{_sysconfdir}/speech-dispatcher/clients
|
||||
install -d %{buildroot}%{_sysconfdir}/speech-dispatcher/modules
|
||||
mv %{buildroot}%{_datadir}/speech-dispatcher/conf/speechd.conf %{buildroot}%{_sysconfdir}/speech-dispatcher/
|
||||
mv %{buildroot}%{_datadir}/speech-dispatcher/conf/clients/* %{buildroot}%{_sysconfdir}/speech-dispatcher/clients
|
||||
mv %{buildroot}%{_datadir}/speech-dispatcher/conf/modules/* %{buildroot}%{_sysconfdir}/speech-dispatcher/modules
|
||||
install -d -m 0700 %{buildroot}%{_localstatedir}/log/speech-dispatcher/
|
||||
desktop-file-validate %{buildroot}/%{_datadir}/speech-dispatcher/conf/desktop/speechd.desktop
|
||||
sed 's/# AudioOutputMethod "pulse,alsa"/AudioOutputMethod "pulse,alsa"/' %{buildroot}%{_sysconfdir}/speech-dispatcher/speechd.conf
|
||||
%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
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%systemd_post speech-dispatcherd.service
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%systemd_postun_with_restart speech-dispatcherd.service
|
||||
%preun
|
||||
%systemd_preun speech-dispatcherd.service
|
||||
%post help
|
||||
/sbin/install-info %{_infodir}/speech-dispatcher.info %{_infodir}/dir || :
|
||||
/sbin/install-info %{_infodir}/spd-say.info %{_infodir}/dir || :
|
||||
/sbin/install-info %{_infodir}/ssip.info %{_infodir}/dir || :
|
||||
%preun help
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/install-info --delete %{_infodir}/speech-dispatcher.info %{_infodir}/dir || :
|
||||
/sbin/install-info --delete %{_infodir}/spd-say.info %{_infodir}/dir || :
|
||||
/sbin/install-info --delete %{_infodir}/ssip.info %{_infodir}/dir || :
|
||||
fi
|
||||
|
||||
%files -f speech-dispatcher.lang
|
||||
%doc COPYING NEWS README
|
||||
%dir %{_sysconfdir}/speech-dispatcher/{clients,modules}
|
||||
%config(noreplace) %{_sysconfdir}/speech-dispatcher/speechd.conf
|
||||
%config(noreplace) %{_sysconfdir}/speech-dispatcher/clients/*.conf
|
||||
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/*.conf
|
||||
%exclude %{_sysconfdir}/speech-dispatcher/modules/{espeak*.conf,festival.conf,flite.conf}
|
||||
%{_bindir}/speech-dispatcher
|
||||
%{_datadir}/speech-dispatcher/
|
||||
%{_libdir}/{libspeechd.so.2,libspeechd.so.2.6.0}
|
||||
%{_libdir}/speech-dispatcher-modules/{sd_cicero,sd_dummy,sd_generic}
|
||||
%{_libdir}/speech-dispatcher/spd*.so
|
||||
%{_datadir}/sounds/speech-dispatcher
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/speech-dispatcher/
|
||||
%{_unitdir}/speech-dispatcherd.service
|
||||
%{_bindir}/{spd-conf,spd-say,spdsend}
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*
|
||||
%{_libdir}/lib*.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
%files help
|
||||
%{_infodir}/*
|
||||
%exclude %{_infodir}/dir
|
||||
|
||||
%files espeak-ng
|
||||
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/espeak-ng.conf
|
||||
%{_libdir}/speech-dispatcher-modules/sd_espeak-ng
|
||||
|
||||
%files festival
|
||||
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/festival.conf
|
||||
%{_libdir}/speech-dispatcher-modules/sd_festival
|
||||
|
||||
%files flite
|
||||
%config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/flite.conf
|
||||
%{_libdir}/speech-dispatcher-modules/sd_flite
|
||||
|
||||
%files -n python3-speechd
|
||||
%{python3_sitearch}/speechd*
|
||||
|
||||
%changelog
|
||||
* Sat Nov 30 2019 Ling Yang <lingyang2@huawei.com> - 0.8.8-9
|
||||
- Package init
|
||||
9
speech-dispatcherd.service
Normal file
9
speech-dispatcherd.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Common high-level interface to speech synthesis.
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/speech-dispatcher -d
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
x
Reference in New Issue
Block a user