2 # - think about default configuration (DefaultModule is espeak, which is not loaded by default)
3 # - common-lisp and guile bindings (src/api/{cl,guile})
6 %bcond_with baratinoo # Voxygen Baratinoo synthesizer support (proprietary)
7 %bcond_without espeak # eSpeak synthesizer support
8 %bcond_without espeak_ng # eSpeak-NG synthesizer support
9 %bcond_without flite # Flite synthesizer support
10 %bcond_with ibmtts # IBM TTS synthesizer support (proprietary)
11 %bcond_without ivona # Ivona synthesizer support
12 %bcond_with kali # Kali synthesizer support (proprietary?)
13 %bcond_without svox # SVOX Pico synthesizer support
14 %bcond_without alsa # ALSA audio output supprot
15 %bcond_without libao # libao audio output supprot
16 %bcond_without nas # NAS audio output support
17 %bcond_without pulseaudio # pulse audio output support
18 %bcond_without python # Python 3 binding (python 2.x no longer supported)
19 %bcond_without static_libs # don't build static libraries
21 Summary: A device independent layer for speech synthesis
22 Summary(pl.UTF-8): Niezależna od urządzenia warstwa obsługująca syntezę mowy
23 Name: speech-dispatcher
26 License: LGPL v2.1+ (library and audio drivers), GPL v2+ (programs and speech modules)
27 Group: Applications/Sound
28 #Source0Download: https://github.com/brailcom/speechd/releases
29 Source0: https://github.com/brailcom/speechd/releases/download/%{version}/%{name}-%{version}.tar.gz
30 # Source0-md5: ace54a15e1d235d7dbdac3ac99004a5b
32 Source2: %{name}.sysconfig
33 Source3: %{name}.tmpfiles
34 Patch0: %{name}-info.patch
35 URL: https://freebsoft.org/speechd
36 %{?with_alsa:BuildRequires: alsa-lib-devel}
37 BuildRequires: autoconf >= 2.63
38 # for __pycache__ support (python 3.2+)
39 BuildRequires: automake >= 1:1.13
40 BuildRequires: dotconf-devel >= 1.3
41 %{?with_espeak:BuildRequires: espeak-devel}
42 %{?with_espeak_ng:BuildRequires: espeak-ng-devel}
43 BuildRequires: gettext-tools >= 0.19.8
44 BuildRequires: glib2-devel >= 1:2.36
45 BuildRequires: help2man
46 %{?with_flite:BuildRequires: flite-devel}
47 %{?with_ibmtts:BuildRequires: ibmtts-devel}
48 BuildRequires: intltool >= 0.40.0
49 %{?with_libao:BuildRequires: libao-devel}
50 %{?with_ivona:BuildRequires: libdumbtts-devel}
51 BuildRequires: libltdl-devel >= 2:2.2
52 BuildRequires: libsndfile-devel >= 1.0.2
53 BuildRequires: libstdc++-devel
54 BuildRequires: libtool >= 2:2.2
55 %{?with_nas:BuildRequires: nas-devel}
56 BuildRequires: pkgconfig
57 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
58 %{?with_python:BuildRequires: python3-devel >= 1:3.2}
59 %{?with_python:BuildRequires: python3-pyxdg}
60 BuildRequires: rpm-pythonprov
61 BuildRequires: rpmbuild(macros) >= 1.527
62 %{?with_svox:BuildRequires: svox-devel}
63 BuildRequires: texinfo
64 %{?with_nas:BuildRequires: xorg-lib-libXau-devel}
65 Requires(post,preun): /sbin/chkconfig
66 Requires(postun): /usr/sbin/groupdel
67 Requires(postun): /usr/sbin/userdel
68 Requires(pre): /bin/id
69 Requires(pre): /usr/bin/getgid
70 Requires(pre): /usr/sbin/groupadd
71 Requires(pre): /usr/sbin/useradd
72 Requires: %{name}-libs = %{version}-%{release}
73 Requires: dotconf >= 1.3
74 Requires: libsndfile >= 1.0.2
76 Requires: python3-%{name} = %{version}-%{release}
78 Provides: group(%{name})
79 Provides: user(%{name})
80 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
83 Speech Dispatcher provides a device independent layer for speech
86 %description -l pl.UTF-8
87 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
88 obsługującą syntezę mowy.
91 Summary: libao audio output module for Speech Dispatcher
92 Summary(pl.UTF-8): Moduł wyjścia dźwięku libao dla Speech Dispatchera
94 Group: Applications/Sound
95 Requires: %{name} = %{version}-%{release}
97 %description audio-libao
98 libao audio output module for Speech Dispatcher.
100 %description audio-libao -l pl.UTF-8
101 Moduł wyjścia dźwięku libao dla Speech Dispatchera.
104 Summary: NAS audio output module for Speech Dispatcher
105 Summary(pl.UTF-8): Moduł wyjścia dźwięku NAS dla Speech Dispatchera
107 Group: Applications/Sound
108 Requires: %{name} = %{version}-%{release}
110 %description audio-nas
111 NAS audio output module for Speech Dispatcher.
113 %description audio-nas -l pl.UTF-8
114 Moduł wyjścia dźwięku NAS dla Speech Dispatchera.
117 Summary: PulseAudio audio output module for Speech Dispatcher
118 Summary(pl.UTF-8): Moduł wyjścia dźwięku PulseAudio dla Speech Dispatchera
120 Group: Applications/Sound
121 Requires: %{name} = %{version}-%{release}
123 %description audio-pulse
124 PulseAudio audio output module for Speech Dispatcher.
126 %description audio-pulse -l pl.UTF-8
127 Moduł wyjścia dźwięku PulseAudio dla Speech Dispatchera.
129 %package module-baratinoo
130 Summary: Baratinoo synthesizer module for Speech Dispatcher
131 Summary(pl.UTF-8): Moduł syntezatora Baratinoo dla Speech Dispatchera
132 Group: Applications/Sound
133 Requires: %{name} = %{version}-%{release}
135 %description module-baratinoo
136 Baratinoo synthesizer module for Speech Dispatcher.
138 %description module-baratinoo -l pl.UTF-8
139 Moduł syntezatora Baratinoo dla Speech Dispatchera.
141 %package module-espeak
142 Summary: eSpeak synthesizer module for Speech Dispatcher
143 Summary(pl.UTF-8): Moduł syntezatora eSpeak dla Speech Dispatchera
144 Group: Applications/Sound
145 Requires: %{name} = %{version}-%{release}
147 %description module-espeak
148 eSpeak synthesizer module for Speech Dispatcher.
150 %description module-espeak -l pl.UTF-8
151 Moduł syntezatora eSpeak dla Speech Dispatchera.
153 %package module-espeak-ng
154 Summary: eSpeak NG synthesizer module for Speech Dispatcher
155 Summary(pl.UTF-8): Moduł syntezatora eSpeak NG dla Speech Dispatchera
156 Group: Applications/Sound
157 Requires: %{name} = %{version}-%{release}
159 %description module-espeak-ng
160 eSpeak NG synthesizer module for Speech Dispatcher.
162 %description module-espeak-ng -l pl.UTF-8
163 Moduł syntezatora eSpeak NG dla Speech Dispatchera.
165 %package module-flite
166 Summary: Flite synthesizer module for Speech Dispatcher
167 Summary(pl.UTF-8): Moduł syntezatora Flite dla Speech Dispatchera
168 Group: Applications/Sound
169 Requires: %{name} = %{version}-%{release}
171 %description module-flite
172 Flite synthesizer module for Speech Dispatcher.
174 %description module-flite -l pl.UTF-8
175 Moduł syntezatora Flite dla Speech Dispatchera.
177 %package module-ibmtts
178 Summary: IBM TTS synthesizer module for Speech Dispatcher
179 Summary(pl.UTF-8): Moduł syntezatora IBM TTS dla Speech Dispatchera
180 Group: Applications/Sound
181 Requires: %{name} = %{version}-%{release}
183 %description module-ibmtts
184 IBM TTS synthesizer module for Speech Dispatcher.
186 %description module-ibmtts -l pl.UTF-8
187 Moduł syntezatora IBM TTS dla Speech Dispatchera.
189 %package module-ivona
190 Summary: Ivona synthesizer module for Speech Dispatcher
191 Summary(pl.UTF-8): Moduł syntezatora Ivona dla Speech Dispatchera
192 Group: Applications/Sound
193 Requires: %{name} = %{version}-%{release}
195 %description module-ivona
196 Ivona synthesizer module for Speech Dispatcher.
198 %description module-ivona -l pl.UTF-8
199 Moduł syntezatora Ivona dla Speech Dispatchera.
202 Summary: Kali synthesizer module for Speech Dispatcher
203 Summary(pl.UTF-8): Moduł syntezatora Kali dla Speech Dispatchera
204 Group: Applications/Sound
205 Requires: %{name} = %{version}-%{release}
207 %description module-kali
208 Kali synthesizer module for Speech Dispatcher.
210 %description module-kali -l pl.UTF-8
211 Moduł syntezatora Kali dla Speech Dispatchera.
214 Summary: SVOX Pico synthesizer module for Speech Dispatcher
215 Summary(pl.UTF-8): Moduł syntezatora SVOX Pico dla Speech Dispatchera
216 Group: Applications/Sound
217 Requires: %{name} = %{version}-%{release}
219 %description module-pico
220 SVOX Pico synthesizer module for Speech Dispatcher.
222 %description module-pico -l pl.UTF-8
223 Moduł syntezatora SVOX Pico dla Speech Dispatchera.
225 %package module-voxin
226 Summary: Voxin synthesizer module for Speech Dispatcher
227 Summary(pl.UTF-8): Moduł syntezatora Voxin dla Speech Dispatchera
228 Group: Applications/Sound
229 Requires: %{name} = %{version}-%{release}
231 %description module-voxin
232 Voxin synthesizer module for Speech Dispatcher.
234 %description module-voxin -l pl.UTF-8
235 Moduł syntezatora Voxin dla Speech Dispatchera.
238 Summary: Speech Dispatcher client library
239 Summary(pl.UTF-8): Biblioteka kliencka Speech Dispatchera
242 Requires: glib2 >= 1:2.36
245 Speech Dispatcher provides a device independent layer for speech
246 synthesis. This package contains client library.
248 %description libs -l pl.UTF-8
249 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
250 obsługującą syntezę mowy. Ten pakiet zawiera biblitotekę kliencką.
253 Summary: Header files for speech-dispatcher library
254 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki speech-dispatcher
256 Group: Development/Libraries
257 Requires: %{name}-libs = %{version}-%{release}
258 Requires: glib2-devel >= 1:2.36
261 Header files for speech-dispatcher library.
263 %description devel -l pl.UTF-8
264 Pliki nagłówkowe biblioteki speech-dispatcher.
267 Summary: Static speech-dispatcher library
268 Summary(pl.UTF-8): Statyczna biblioteka speech-dispatcher
270 Group: Development/Libraries
271 Requires: %{name}-devel = %{version}-%{release}
274 Static speech-dispatcher library.
276 %description static -l pl.UTF-8
277 Statyczna biblioteka speech-dispatcher.
279 %package -n python3-%{name}
280 Summary: Python 3 library for communication with Speech Dispatcher
281 Summary(pl.UTF-8): Biblioteka Pythona 3 do komunikacji ze Speech Dispatcherem
283 Group: Libraries/Python
284 Requires: python3-modules
285 Obsoletes: python-speech-dispatcher
287 %description -n python3-%{name}
288 Speech Dispatcher provides a device independent layer for speech
289 synthesis. This package contains a Python 3 library for communication
290 with Speech Dispatcher.
292 %description -n python3-%{name} -l pl.UTF-8
293 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
294 obsługującą syntezę mowy. Ten pakiet zawiera bibliotekę Pythona 3 do
295 komunikacji ze Speech Dispatcherem.
301 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' src/api/python/speechd_config/spd-conf
310 %{__disable python} \
311 --disable-silent-rules \
312 %{__enable_disable static_libs static} \
313 %{__with_without alsa} \
314 %{__with_without baratinoo} \
315 --with-default-audio-method=%{?with_alsa:alsa}%{!?with_alsa:oss} \
316 %{__with_without espeak} \
317 %{__with_without flite} \
318 %{__with_without ibmtts} \
319 %{__with_without ivona} \
320 %{__with_without kali} \
321 %{__with_without libao} \
322 %{__with_without nas} \
323 %{__with_without pulseaudio pulse} \
324 %{__with_without svox pico}
329 rm -rf $RPM_BUILD_ROOT
330 install -d $RPM_BUILD_ROOT/var/{log,run}/speech-dispatcher \
331 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
334 DESTDIR=$RPM_BUILD_ROOT
336 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
337 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
338 install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
340 %{__rm} $RPM_BUILD_ROOT%{_libdir}/speech-dispatcher/spd_*.la
341 %if %{with static_libs}
342 %{__rm} $RPM_BUILD_ROOT%{_libdir}/speech-dispatcher/spd_*.a
347 rm -rf $RPM_BUILD_ROOT
350 %groupadd -g 224 %{name}
351 %useradd -u 224 -g 224 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
354 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
355 /sbin/chkconfig --add %{name}
356 %service %{name} restart
359 if [ "$1" = "0" ]; then
360 %service %{name} stop
361 /sbin/chkconfig --del %{name}
365 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
366 if [ "$1" = "0" ]; then
371 %post libs -p /sbin/ldconfig
372 %postun libs -p /sbin/ldconfig
374 %files -f %{name}.lang
375 %defattr(644,root,root,755)
376 %doc ANNOUNCE AUTHORS BUGS FAQ NEWS README.md README.overview.md TODO
377 %attr(754,root,root) /etc/rc.d/init.d/%{name}
378 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
379 %attr(755,root,root) %{_bindir}/spd-conf
380 %attr(755,root,root) %{_bindir}/spd-say
381 %attr(755,root,root) %{_bindir}/spdsend
382 %attr(755,root,root) %{_bindir}/speech-dispatcher
383 %dir %{_libdir}/speech-dispatcher
384 %{?with_alsa:%attr(755,root,root) %{_libdir}/speech-dispatcher/spd_alsa.so}
385 %{_libdir}/speech-dispatcher/spd_oss.so
386 %dir %{_libdir}/speech-dispatcher-modules
387 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_cicero
388 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_dummy
389 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_festival
390 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_generic
391 %{_datadir}/speech-dispatcher
392 %{_datadir}/sounds/speech-dispatcher
393 %dir %{_sysconfdir}/speech-dispatcher
394 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/speechd.conf
395 %dir %{_sysconfdir}/speech-dispatcher/clients
396 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/emacs.conf
397 %dir %{_sysconfdir}/speech-dispatcher/modules
398 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/cicero.conf
399 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/dtk-generic.conf
400 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/epos-generic.conf
401 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-mbrola-generic.conf
402 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/festival.conf
403 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/llia_phon-generic.conf
404 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/mary-generic-disabled.conf
405 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/swift-generic.conf
406 %dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher
407 %dir %attr(755,%{name},%{name}) /var/log/speech-dispatcher
408 %{systemdunitdir}/speech-dispatcherd.service
409 %{systemdtmpfilesdir}/%{name}.conf
410 %{_mandir}/man1/spd-conf.1*
411 %{_mandir}/man1/spd-say.1*
412 %{_mandir}/man1/speech-dispatcher.1*
413 %{_infodir}/spd-say.info*
414 %{_infodir}/speech-dispatcher.info*
415 %lang(cs) %{_infodir}/speech-dispatcher-cs.info*
416 %{_infodir}/ssip.info*
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_libao.so
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_nas.so
430 %if %{with pulseaudio}
432 %defattr(644,root,root,755)
433 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_pulse.so
436 %if %{with baratinoo}
437 %files module-baratinoo
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_baratinoo
440 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/baratinoo.conf
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_espeak
447 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak.conf
450 %if %{with espeak_ng}
451 %files module-espeak-ng
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_espeak-ng
454 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-ng.conf
455 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-ng-mbrola-generic.conf
460 %defattr(644,root,root,755)
461 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_flite
462 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/flite.conf
467 %defattr(644,root,root,755)
468 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_ibmtts
469 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/ibmtts.conf
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_ivona
476 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/ivona.conf
481 %defattr(644,root,root,755)
482 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_kali
483 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/kali.conf
488 %defattr(644,root,root,755)
489 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_pico
490 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/pico.conf
494 %defattr(644,root,root,755)
495 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_voxin
496 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/voxin.conf
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_libdir}/libspeechd.so.*.*.*
501 %attr(755,root,root) %ghost %{_libdir}/libspeechd.so.2
504 %defattr(644,root,root,755)
505 %attr(755,root,root) %{_libdir}/libspeechd.so
506 %{_libdir}/libspeechd.la
507 %{_includedir}/speech-dispatcher
508 %{_pkgconfigdir}/speech-dispatcher.pc
510 %if %{with static_libs}
512 %defattr(644,root,root,755)
513 %{_libdir}/libspeechd.a
517 %files -n python3-%{name}
518 %defattr(644,root,root,755)
519 %dir %{py3_sitedir}/speechd
520 %{py3_sitedir}/speechd/*.py
521 %{py3_sitedir}/speechd/__pycache__
522 %dir %{py3_sitedir}/speechd_config
523 %{py3_sitedir}/speechd_config/*.py
524 %{py3_sitedir}/speechd_config/__pycache__