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_with voxin # Voxin output support
18 %bcond_without pulseaudio # pulse audio output support
19 %bcond_without python # Python 3 binding (python 2.x no longer supported)
20 %bcond_without static_libs # don't build static libraries
22 Summary: A device independent layer for speech synthesis
23 Summary(pl.UTF-8): Niezależna od urządzenia warstwa obsługująca syntezę mowy
24 Name: speech-dispatcher
27 License: LGPL v2.1+ (library and audio drivers), GPL v2+ (programs and speech modules)
28 Group: Applications/Sound
29 #Source0Download: https://github.com/brailcom/speechd/releases
30 Source0: https://github.com/brailcom/speechd/releases/download/%{version}/%{name}-%{version}.tar.gz
31 # Source0-md5: ace54a15e1d235d7dbdac3ac99004a5b
33 Source2: %{name}.sysconfig
34 Source3: %{name}.tmpfiles
35 Patch0: %{name}-info.patch
36 URL: https://freebsoft.org/speechd
37 %{?with_alsa:BuildRequires: alsa-lib-devel}
38 BuildRequires: autoconf >= 2.63
39 # for __pycache__ support (python 3.2+)
40 BuildRequires: automake >= 1:1.13
41 BuildRequires: dotconf-devel >= 1.3
42 %{?with_espeak:BuildRequires: espeak-devel}
43 %{?with_espeak_ng:BuildRequires: espeak-ng-devel}
44 BuildRequires: gettext-tools >= 0.19.8
45 BuildRequires: glib2-devel >= 1:2.36
46 BuildRequires: help2man
47 %{?with_flite:BuildRequires: flite-devel}
48 %{?with_ibmtts:BuildRequires: ibmtts-devel}
49 BuildRequires: intltool >= 0.40.0
50 %{?with_libao:BuildRequires: libao-devel}
51 %{?with_ivona:BuildRequires: libdumbtts-devel}
52 BuildRequires: libltdl-devel >= 2:2.2
53 BuildRequires: libsndfile-devel >= 1.0.2
54 BuildRequires: libstdc++-devel
55 BuildRequires: libtool >= 2:2.2
56 %{?with_voxin:BuildRequires: libvoxin-devel}
57 %{?with_nas:BuildRequires: nas-devel}
58 BuildRequires: pkgconfig
59 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
60 %{?with_python:BuildRequires: python3-devel >= 1:3.2}
61 %{?with_python:BuildRequires: python3-pyxdg}
62 BuildRequires: rpm-pythonprov
63 BuildRequires: rpmbuild(macros) >= 1.527
64 %{?with_svox:BuildRequires: svox-devel}
65 BuildRequires: texinfo
66 %{?with_nas:BuildRequires: xorg-lib-libXau-devel}
67 Requires(post,preun): /sbin/chkconfig
68 Requires(postun): /usr/sbin/groupdel
69 Requires(postun): /usr/sbin/userdel
70 Requires(pre): /bin/id
71 Requires(pre): /usr/bin/getgid
72 Requires(pre): /usr/sbin/groupadd
73 Requires(pre): /usr/sbin/useradd
74 Requires: %{name}-libs = %{version}-%{release}
75 Requires: dotconf >= 1.3
76 Requires: libsndfile >= 1.0.2
78 Requires: python3-%{name} = %{version}-%{release}
80 Provides: group(%{name})
81 Provides: user(%{name})
82 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
85 Speech Dispatcher provides a device independent layer for speech
88 %description -l pl.UTF-8
89 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
90 obsługującą syntezę mowy.
93 Summary: libao audio output module for Speech Dispatcher
94 Summary(pl.UTF-8): Moduł wyjścia dźwięku libao dla Speech Dispatchera
96 Group: Applications/Sound
97 Requires: %{name} = %{version}-%{release}
99 %description audio-libao
100 libao audio output module for Speech Dispatcher.
102 %description audio-libao -l pl.UTF-8
103 Moduł wyjścia dźwięku libao dla Speech Dispatchera.
106 Summary: NAS audio output module for Speech Dispatcher
107 Summary(pl.UTF-8): Moduł wyjścia dźwięku NAS dla Speech Dispatchera
109 Group: Applications/Sound
110 Requires: %{name} = %{version}-%{release}
112 %description audio-nas
113 NAS audio output module for Speech Dispatcher.
115 %description audio-nas -l pl.UTF-8
116 Moduł wyjścia dźwięku NAS dla Speech Dispatchera.
119 Summary: PulseAudio audio output module for Speech Dispatcher
120 Summary(pl.UTF-8): Moduł wyjścia dźwięku PulseAudio dla Speech Dispatchera
122 Group: Applications/Sound
123 Requires: %{name} = %{version}-%{release}
125 %description audio-pulse
126 PulseAudio audio output module for Speech Dispatcher.
128 %description audio-pulse -l pl.UTF-8
129 Moduł wyjścia dźwięku PulseAudio dla Speech Dispatchera.
131 %package module-baratinoo
132 Summary: Baratinoo synthesizer module for Speech Dispatcher
133 Summary(pl.UTF-8): Moduł syntezatora Baratinoo dla Speech Dispatchera
134 Group: Applications/Sound
135 Requires: %{name} = %{version}-%{release}
137 %description module-baratinoo
138 Baratinoo synthesizer module for Speech Dispatcher.
140 %description module-baratinoo -l pl.UTF-8
141 Moduł syntezatora Baratinoo dla Speech Dispatchera.
143 %package module-espeak
144 Summary: eSpeak synthesizer module for Speech Dispatcher
145 Summary(pl.UTF-8): Moduł syntezatora eSpeak dla Speech Dispatchera
146 Group: Applications/Sound
147 Requires: %{name} = %{version}-%{release}
149 %description module-espeak
150 eSpeak synthesizer module for Speech Dispatcher.
152 %description module-espeak -l pl.UTF-8
153 Moduł syntezatora eSpeak dla Speech Dispatchera.
155 %package module-espeak-ng
156 Summary: eSpeak NG synthesizer module for Speech Dispatcher
157 Summary(pl.UTF-8): Moduł syntezatora eSpeak NG dla Speech Dispatchera
158 Group: Applications/Sound
159 Requires: %{name} = %{version}-%{release}
161 %description module-espeak-ng
162 eSpeak NG synthesizer module for Speech Dispatcher.
164 %description module-espeak-ng -l pl.UTF-8
165 Moduł syntezatora eSpeak NG dla Speech Dispatchera.
167 %package module-flite
168 Summary: Flite synthesizer module for Speech Dispatcher
169 Summary(pl.UTF-8): Moduł syntezatora Flite dla Speech Dispatchera
170 Group: Applications/Sound
171 Requires: %{name} = %{version}-%{release}
173 %description module-flite
174 Flite synthesizer module for Speech Dispatcher.
176 %description module-flite -l pl.UTF-8
177 Moduł syntezatora Flite dla Speech Dispatchera.
179 %package module-ibmtts
180 Summary: IBM TTS synthesizer module for Speech Dispatcher
181 Summary(pl.UTF-8): Moduł syntezatora IBM TTS dla Speech Dispatchera
182 Group: Applications/Sound
183 Requires: %{name} = %{version}-%{release}
185 %description module-ibmtts
186 IBM TTS synthesizer module for Speech Dispatcher.
188 %description module-ibmtts -l pl.UTF-8
189 Moduł syntezatora IBM TTS dla Speech Dispatchera.
191 %package module-ivona
192 Summary: Ivona synthesizer module for Speech Dispatcher
193 Summary(pl.UTF-8): Moduł syntezatora Ivona dla Speech Dispatchera
194 Group: Applications/Sound
195 Requires: %{name} = %{version}-%{release}
197 %description module-ivona
198 Ivona synthesizer module for Speech Dispatcher.
200 %description module-ivona -l pl.UTF-8
201 Moduł syntezatora Ivona dla Speech Dispatchera.
204 Summary: Kali synthesizer module for Speech Dispatcher
205 Summary(pl.UTF-8): Moduł syntezatora Kali dla Speech Dispatchera
206 Group: Applications/Sound
207 Requires: %{name} = %{version}-%{release}
209 %description module-kali
210 Kali synthesizer module for Speech Dispatcher.
212 %description module-kali -l pl.UTF-8
213 Moduł syntezatora Kali dla Speech Dispatchera.
216 Summary: SVOX Pico synthesizer module for Speech Dispatcher
217 Summary(pl.UTF-8): Moduł syntezatora SVOX Pico dla Speech Dispatchera
218 Group: Applications/Sound
219 Requires: %{name} = %{version}-%{release}
221 %description module-pico
222 SVOX Pico synthesizer module for Speech Dispatcher.
224 %description module-pico -l pl.UTF-8
225 Moduł syntezatora SVOX Pico dla Speech Dispatchera.
227 %package module-voxin
228 Summary: Voxin synthesizer module for Speech Dispatcher
229 Summary(pl.UTF-8): Moduł syntezatora Voxin dla Speech Dispatchera
230 Group: Applications/Sound
231 Requires: %{name} = %{version}-%{release}
233 %description module-voxin
234 Voxin synthesizer module for Speech Dispatcher.
236 %description module-voxin -l pl.UTF-8
237 Moduł syntezatora Voxin dla Speech Dispatchera.
240 Summary: Speech Dispatcher client library
241 Summary(pl.UTF-8): Biblioteka kliencka Speech Dispatchera
244 Requires: glib2 >= 1:2.36
247 Speech Dispatcher provides a device independent layer for speech
248 synthesis. This package contains client library.
250 %description libs -l pl.UTF-8
251 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
252 obsługującą syntezę mowy. Ten pakiet zawiera biblitotekę kliencką.
255 Summary: Header files for speech-dispatcher library
256 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki speech-dispatcher
258 Group: Development/Libraries
259 Requires: %{name}-libs = %{version}-%{release}
260 Requires: glib2-devel >= 1:2.36
263 Header files for speech-dispatcher library.
265 %description devel -l pl.UTF-8
266 Pliki nagłówkowe biblioteki speech-dispatcher.
269 Summary: Static speech-dispatcher library
270 Summary(pl.UTF-8): Statyczna biblioteka speech-dispatcher
272 Group: Development/Libraries
273 Requires: %{name}-devel = %{version}-%{release}
276 Static speech-dispatcher library.
278 %description static -l pl.UTF-8
279 Statyczna biblioteka speech-dispatcher.
281 %package -n python3-%{name}
282 Summary: Python 3 library for communication with Speech Dispatcher
283 Summary(pl.UTF-8): Biblioteka Pythona 3 do komunikacji ze Speech Dispatcherem
285 Group: Libraries/Python
286 Requires: python3-modules
287 Obsoletes: python-speech-dispatcher
289 %description -n python3-%{name}
290 Speech Dispatcher provides a device independent layer for speech
291 synthesis. This package contains a Python 3 library for communication
292 with Speech Dispatcher.
294 %description -n python3-%{name} -l pl.UTF-8
295 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
296 obsługującą syntezę mowy. Ten pakiet zawiera bibliotekę Pythona 3 do
297 komunikacji ze Speech Dispatcherem.
303 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' src/api/python/speechd_config/spd-conf
312 %{__disable python} \
313 --disable-silent-rules \
314 %{__enable_disable static_libs static} \
315 %{__with_without alsa} \
316 %{__with_without baratinoo} \
317 --with-default-audio-method=%{?with_alsa:alsa}%{!?with_alsa:oss} \
318 %{__with_without espeak} \
319 %{__with_without flite} \
320 %{__with_without ibmtts} \
321 %{__with_without ivona} \
322 %{__with_without kali} \
323 %{__with_without libao} \
324 %{__with_without nas} \
325 %{__with_without pulseaudio pulse} \
326 %{__with_without svox pico} \
327 %{__with_without voxin}
332 rm -rf $RPM_BUILD_ROOT
333 install -d $RPM_BUILD_ROOT/var/{log,run}/speech-dispatcher \
334 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
337 DESTDIR=$RPM_BUILD_ROOT
339 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
340 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
341 install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
343 %{__rm} $RPM_BUILD_ROOT%{_libdir}/speech-dispatcher/spd_*.la
344 %if %{with static_libs}
345 %{__rm} $RPM_BUILD_ROOT%{_libdir}/speech-dispatcher/spd_*.a
348 %{__mv} -f $RPM_BUILD_ROOT%{_datadir}/locale/nb{_NO,}
353 rm -rf $RPM_BUILD_ROOT
356 %groupadd -g 224 %{name}
357 %useradd -u 224 -g 224 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
360 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
361 /sbin/chkconfig --add %{name}
362 %service %{name} restart
365 if [ "$1" = "0" ]; then
366 %service %{name} stop
367 /sbin/chkconfig --del %{name}
371 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
372 if [ "$1" = "0" ]; then
377 %post libs -p /sbin/ldconfig
378 %postun libs -p /sbin/ldconfig
380 %files -f %{name}.lang
381 %defattr(644,root,root,755)
382 %doc ANNOUNCE AUTHORS BUGS FAQ NEWS README.md README.overview.md TODO
383 %attr(754,root,root) /etc/rc.d/init.d/%{name}
384 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
385 %attr(755,root,root) %{_bindir}/spd-conf
386 %attr(755,root,root) %{_bindir}/spd-say
387 %attr(755,root,root) %{_bindir}/spdsend
388 %attr(755,root,root) %{_bindir}/speech-dispatcher
389 %dir %{_libdir}/speech-dispatcher
390 %{?with_alsa:%attr(755,root,root) %{_libdir}/speech-dispatcher/spd_alsa.so}
391 %{_libdir}/speech-dispatcher/spd_oss.so
392 %dir %{_libdir}/speech-dispatcher-modules
393 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_cicero
394 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_dummy
395 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_festival
396 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_generic
397 %{_datadir}/speech-dispatcher
398 %{_datadir}/sounds/speech-dispatcher
399 %dir %{_sysconfdir}/speech-dispatcher
400 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/speechd.conf
401 %dir %{_sysconfdir}/speech-dispatcher/clients
402 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/emacs.conf
403 %dir %{_sysconfdir}/speech-dispatcher/modules
404 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/cicero.conf
405 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/dtk-generic.conf
406 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/epos-generic.conf
407 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-mbrola-generic.conf
408 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/festival.conf
409 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/llia_phon-generic.conf
410 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/mary-generic-disabled.conf
411 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/swift-generic.conf
412 %dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher
413 %dir %attr(755,%{name},%{name}) /var/log/speech-dispatcher
414 %{systemdunitdir}/speech-dispatcherd.service
415 %{systemdtmpfilesdir}/%{name}.conf
416 %{_mandir}/man1/spd-conf.1*
417 %{_mandir}/man1/spd-say.1*
418 %{_mandir}/man1/speech-dispatcher.1*
419 %{_infodir}/spd-say.info*
420 %{_infodir}/speech-dispatcher.info*
421 %lang(cs) %{_infodir}/speech-dispatcher-cs.info*
422 %{_infodir}/ssip.info*
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_libao.so
432 %defattr(644,root,root,755)
433 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_nas.so
436 %if %{with pulseaudio}
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_pulse.so
442 %if %{with baratinoo}
443 %files module-baratinoo
444 %defattr(644,root,root,755)
445 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_baratinoo
446 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/baratinoo.conf
451 %defattr(644,root,root,755)
452 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_espeak
453 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak.conf
456 %if %{with espeak_ng}
457 %files module-espeak-ng
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_espeak-ng
460 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-ng.conf
461 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-ng-mbrola-generic.conf
466 %defattr(644,root,root,755)
467 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_flite
468 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/flite.conf
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_ibmtts
475 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/ibmtts.conf
480 %defattr(644,root,root,755)
481 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_ivona
482 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/ivona.conf
487 %defattr(644,root,root,755)
488 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_kali
489 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/kali.conf
494 %defattr(644,root,root,755)
495 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_pico
496 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/pico.conf
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_voxin
503 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/voxin.conf
507 %defattr(644,root,root,755)
508 %attr(755,root,root) %{_libdir}/libspeechd.so.*.*.*
509 %attr(755,root,root) %ghost %{_libdir}/libspeechd.so.2
512 %defattr(644,root,root,755)
513 %attr(755,root,root) %{_libdir}/libspeechd.so
514 %{_libdir}/libspeechd.la
515 %{_includedir}/speech-dispatcher
516 %{_pkgconfigdir}/speech-dispatcher.pc
518 %if %{with static_libs}
520 %defattr(644,root,root,755)
521 %{_libdir}/libspeechd.a
525 %files -n python3-%{name}
526 %defattr(644,root,root,755)
527 %dir %{py3_sitedir}/speechd
528 %{py3_sitedir}/speechd/*.py
529 %{py3_sitedir}/speechd/__pycache__
530 %dir %{py3_sitedir}/speechd_config
531 %{py3_sitedir}/speechd_config/*.py
532 %{py3_sitedir}/speechd_config/__pycache__