1 # TODO: think about default configuration (DefaultModule is espeak, which is not loaded by default)
4 %bcond_with ibmtts # IBM TTS synthesizer support (commercial, proprietary)
5 %bcond_without espeak # eSpeak synthesizer support
6 %bcond_without flite # Flite synthesizer support
7 %bcond_without ivona # Ivona synthesizer support
8 %bcond_without svox # SVOX Pico synthesizer support
9 %bcond_without alsa # ALSA audio output supprot
10 %bcond_without libao # libao audio output supprot
11 %bcond_without nas # NAS audio output support
12 %bcond_without pulseaudio # pulse audio output support
13 %bcond_without python # Python 3 binding (python 2.x no longer supported)
14 %bcond_without static_libs # don't build static libraries
16 Summary: A device independent layer for speech synthesis
17 Summary(pl.UTF-8): Niezależna od urządzenia warstwa obsługująca syntezę mowy
18 Name: speech-dispatcher
22 Group: Applications/Sound
23 Source0: http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
24 # Source0-md5: c219820f6c10ee5a591cb4a93949930c
26 Source2: %{name}.sysconfig
27 Source3: %{name}.tmpfiles
28 Patch0: %{name}-info.patch
29 URL: http://www.freebsoft.org/
30 %{?with_alsa:BuildRequires: alsa-lib-devel}
31 BuildRequires: autoconf >= 2.63
32 # for __pycache__ support (python 3.2+)
33 BuildRequires: automake >= 1:1.13
34 BuildRequires: dotconf-devel >= 1.3
35 %{?with_espeak:BuildRequires: espeak-devel}
36 BuildRequires: glib2-devel >= 1:2.28
37 %{?with_flite:BuildRequires: flite-devel}
38 %{?with_ibmtts:BuildRequires: ibmtts-devel}
39 BuildRequires: intltool >= 0.40.0
40 BuildRequires: libatomic_ops
41 %{?with_ivona:BuildRequires: libdumbtts-devel}
42 %{?with_libao:BuildRequires: libao-devel}
43 BuildRequires: libsndfile-devel >= 1.0.2
44 BuildRequires: libtool >= 2:2.2
45 %{?with_nas:BuildRequires: nas-devel}
46 BuildRequires: pkgconfig
47 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
48 %{?with_python:BuildRequires: python3-devel >= 1:3.2}
49 BuildRequires: rpm-pythonprov
50 BuildRequires: rpmbuild(macros) >= 1.527
51 %{?with_svox:BuildRequires: svox-devel}
52 BuildRequires: texinfo
53 %{?with_nas:BuildRequires: xorg-lib-libXau-devel}
54 Requires(post,preun): /sbin/chkconfig
55 Requires(postun): /usr/sbin/groupdel
56 Requires(postun): /usr/sbin/userdel
57 Requires(pre): /bin/id
58 Requires(pre): /usr/bin/getgid
59 Requires(pre): /usr/sbin/groupadd
60 Requires(pre): /usr/sbin/useradd
61 Requires: %{name}-libs = %{version}-%{release}
62 Requires: dotconf >= 1.3
63 Requires: libsndfile >= 1.0.2
65 Provides: group(%{name})
66 Provides: user(%{name})
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70 Speech Dispatcher provides a device independent layer for speech
73 %description -l pl.UTF-8
74 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
75 obsługującą syntezę mowy.
78 Summary: libao audio output module for Speech Dispatcher
79 Summary(pl.UTF-8): Moduł wyjścia dźwięku libao dla Speech Dispatchera
80 Group: Applications/Sound
81 Requires: %{name} = %{version}-%{release}
83 %description audio-libao
84 libao audio output module for Speech Dispatcher.
86 %description audio-libao -l pl.UTF-8
87 Moduł wyjścia dźwięku libao dla Speech Dispatchera.
90 Summary: NAS audio output module for Speech Dispatcher
91 Summary(pl.UTF-8): Moduł wyjścia dźwięku NAS dla Speech Dispatchera
92 Group: Applications/Sound
93 Requires: %{name} = %{version}-%{release}
95 %description audio-nas
96 NAS audio output module for Speech Dispatcher.
98 %description audio-nas -l pl.UTF-8
99 Moduł wyjścia dźwięku NAS dla Speech Dispatchera.
102 Summary: PulseAudio audio output module for Speech Dispatcher
103 Summary(pl.UTF-8): Moduł wyjścia dźwięku PulseAudio dla Speech Dispatchera
104 Group: Applications/Sound
105 Requires: %{name} = %{version}-%{release}
107 %description audio-pulse
108 PulseAudio audio output module for Speech Dispatcher.
110 %description audio-pulse -l pl.UTF-8
111 Moduł wyjścia dźwięku PulseAudio dla Speech Dispatchera.
113 %package module-espeak
114 Summary: eSpeak synthesizer module for Speech Dispatcher
115 Summary(pl.UTF-8): Moduł syntezatora eSpeak dla Speech Dispatchera
116 Group: Applications/Sound
117 Requires: %{name} = %{version}-%{release}
119 %description module-espeak
120 eSpeak synthesizer module for Speech Dispatcher.
122 %description module-espeak -l pl.UTF-8
123 Moduł syntezatora eSpeak dla Speech Dispatchera.
125 %package module-flite
126 Summary: Flite synthesizer module for Speech Dispatcher
127 Summary(pl.UTF-8): Moduł syntezatora Flite dla Speech Dispatchera
128 Group: Applications/Sound
129 Requires: %{name} = %{version}-%{release}
131 %description module-flite
132 Flite synthesizer module for Speech Dispatcher.
134 %description module-flite -l pl.UTF-8
135 Moduł syntezatora Flite dla Speech Dispatchera.
137 %package module-ibmtts
138 Summary: IBM TTS synthesizer module for Speech Dispatcher
139 Summary(pl.UTF-8): Moduł syntezatora IBM TTS dla Speech Dispatchera
140 Group: Applications/Sound
141 Requires: %{name} = %{version}-%{release}
143 %description module-ibmtts
144 IBM TTS synthesizer module for Speech Dispatcher.
146 %description module-ibmtts -l pl.UTF-8
147 Moduł syntezatora IBM TTS dla Speech Dispatchera.
149 %package module-ivona
150 Summary: Ivona synthesizer module for Speech Dispatcher
151 Summary(pl.UTF-8): Moduł syntezatora Ivona dla Speech Dispatchera
152 Group: Applications/Sound
153 Requires: %{name} = %{version}-%{release}
155 %description module-ivona
156 Ivona synthesizer module for Speech Dispatcher.
158 %description module-ivona -l pl.UTF-8
159 Moduł syntezatora Ivona dla Speech Dispatchera.
162 Summary: SVOX Pico synthesizer module for Speech Dispatcher
163 Summary(pl.UTF-8): Moduł syntezatora SVOX Pico dla Speech Dispatchera
164 Group: Applications/Sound
165 Requires: %{name} = %{version}-%{release}
167 %description module-pico
168 SVOX Pico synthesizer module for Speech Dispatcher.
170 %description module-pico -l pl.UTF-8
171 Moduł syntezatora SVOX Pico dla Speech Dispatchera.
174 Summary: Speech Dispatcher client library
175 Summary(pl.UTF-8): Biblioteka kliencka Speech Dispatchera
177 Requires: glib2 >= 1:2.28
180 Speech Dispatcher provides a device independent layer for speech
181 synthesis. This package contains client library.
183 %description libs -l pl.UTF-8
184 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
185 obsługującą syntezę mowy. Ten pakiet zawiera biblitotekę kliencką.
188 Summary: Header files for speech-dispatcher library
189 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki speech-dispatcher
190 Group: Development/Libraries
191 Requires: %{name}-libs = %{version}-%{release}
192 Requires: glib2-devel >= 1:2.28
195 Header files for speech-dispatcher library.
197 %description devel -l pl.UTF-8
198 Pliki nagłówkowe biblioteki speech-dispatcher.
201 Summary: Static speech-dispatcher library
202 Summary(pl.UTF-8): Statyczna biblioteka speech-dispatcher
203 Group: Development/Libraries
204 Requires: %{name}-devel = %{version}-%{release}
207 Static speech-dispatcher library.
209 %description static -l pl.UTF-8
210 Statyczna biblioteka speech-dispatcher.
212 %package -n python3-%{name}
213 Summary: Python 3 library for communication with Speech Dispatcher
214 Summary(pl.UTF-8): Biblioteka Pythona 3 do komunikacji ze Speech Dispatcherem
215 Group: Libraries/Python
216 Requires: python3-modules
217 Obsoletes: python-speech-dispatcher
219 %description -n python3-%{name}
220 Speech Dispatcher provides a device independent layer for speech
221 synthesis. This package contains a Python 3 library for communication
222 with Speech Dispatcher.
224 %description -n python3-%{name} -l pl.UTF-8
225 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
226 obsługującą syntezę mowy. Ten pakiet zawiera bibliotekę Pythona 3 do
227 komunikacji ze Speech Dispatcherem.
240 %{__disable python} \
241 %{__enable_disable static_libs static} \
242 %{__with_without alsa} \
243 --with-default-audio-method=%{?with_alsa:alsa}%{!?with_alsa:oss} \
244 %{__with_without espeak} \
245 %{__with_without flite} \
246 %{__with_without ibmtts} \
247 %{__with_without ivona} \
248 %{__with_without libao} \
249 %{__with_without nas} \
250 %{__with_without pulseaudio pulse} \
251 %{__with_without svox pico}
256 rm -rf $RPM_BUILD_ROOT
257 install -d $RPM_BUILD_ROOT/var/{log,run}/speech-dispatcher \
258 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
261 DESTDIR=$RPM_BUILD_ROOT
263 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
264 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
265 install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
267 %{__rm} $RPM_BUILD_ROOT%{_libdir}/speech-dispatcher/spd_*.la
268 %if %{with static_libs}
269 %{__rm} $RPM_BUILD_ROOT%{_libdir}/speech-dispatcher/spd_*.a
271 %if %{without ibmtts}
272 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/modules/ibmtts.conf
278 rm -rf $RPM_BUILD_ROOT
281 %groupadd -g 224 %{name}
282 %useradd -u 224 -g 224 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
285 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
286 /sbin/chkconfig --add %{name}
287 %service %{name} restart
290 if [ "$1" = "0" ]; then
291 %service %{name} stop
292 /sbin/chkconfig --del %{name}
296 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
297 if [ "$1" = "0" ]; then
302 %post libs -p /sbin/ldconfig
303 %postun libs -p /sbin/ldconfig
305 %files -f %{name}.lang
306 %defattr(644,root,root,755)
307 %doc AUTHORS ChangeLog NEWS README TODO
308 %attr(754,root,root) /etc/rc.d/init.d/%{name}
309 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
310 %attr(755,root,root) %{_bindir}/spd-conf
311 %attr(755,root,root) %{_bindir}/spd-say
312 %attr(755,root,root) %{_bindir}/spdsend
313 %attr(755,root,root) %{_bindir}/speech-dispatcher
314 %dir %{_libdir}/speech-dispatcher
315 %{?with_alsa:%attr(755,root,root) %{_libdir}/speech-dispatcher/spd_alsa.so}
316 %{_libdir}/speech-dispatcher/spd_oss.so
317 %dir %{_libdir}/speech-dispatcher-modules
318 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_cicero
319 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_dummy
320 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_festival
321 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_generic
322 %{_datadir}/speech-dispatcher
323 %{_datadir}/sounds/speech-dispatcher
324 %dir %{_sysconfdir}/speech-dispatcher
325 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/speechd.conf
326 %dir %{_sysconfdir}/speech-dispatcher/clients
327 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/emacs.conf
328 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/gnome-speech.conf
329 %dir %{_sysconfdir}/speech-dispatcher/modules
330 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/cicero.conf
331 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/dtk-generic.conf
332 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/epos-generic.conf
333 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-generic.conf
334 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-mbrola-generic.conf
335 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/festival.conf
336 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/llia_phon-generic.conf
337 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/swift-generic.conf
338 %dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher
339 %dir %attr(755,%{name},%{name}) /var/log/speech-dispatcher
340 /usr/lib/tmpfiles.d/%{name}.conf
341 %{_infodir}/spd-say.info*
342 %{_infodir}/speech-dispatcher.info*
343 %lang(cs) %{_infodir}/speech-dispatcher-cs.info*
344 %{_infodir}/ssip.info*
348 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_libao.so
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_nas.so
358 %if %{with pulseaudio}
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_pulse.so
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_espeak
368 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak.conf
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_flite
375 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/flite.conf
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_ibmtts
382 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/ibmtts.conf
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_ivona
389 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/ivona.conf
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_pico
396 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/pico.conf
397 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/pico-generic.conf
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/libspeechd.so.*.*.*
403 %attr(755,root,root) %ghost %{_libdir}/libspeechd.so.2
406 %defattr(644,root,root,755)
407 %attr(755,root,root) %{_libdir}/libspeechd.so
408 %{_libdir}/libspeechd.la
409 %{_includedir}/speech-dispatcher
410 %{_pkgconfigdir}/speech-dispatcher.pc
412 %if %{with static_libs}
414 %defattr(644,root,root,755)
415 %{_libdir}/libspeechd.a
419 %files -n python3-%{name}
420 %defattr(644,root,root,755)
421 %dir %{py3_sitedir}/speechd
422 %{py3_sitedir}/speechd/*.py
423 %{py3_sitedir}/speechd/__pycache__
424 %dir %{py3_sitedir}/speechd_config
425 %{py3_sitedir}/speechd_config/*.py
426 %{py3_sitedir}/speechd_config/__pycache__