]> git.pld-linux.org Git - packages/speech-dispatcher.git/blob - speech-dispatcher.spec
3a5aca1790bee4b79c1e13c3d714a05a921bbea8
[packages/speech-dispatcher.git] / speech-dispatcher.spec
1 # TODO: think about default configuration (DefaultModule is espeak, which is not loaded by default)
2 #
3 # Conditional build:
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
15 #
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
19 Version:        0.8.1
20 Release:        2
21 License:        GPL v2
22 Group:          Applications/Sound
23 Source0:        http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
24 # Source0-md5:  c219820f6c10ee5a591cb4a93949930c
25 Source1:        %{name}.init
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
64 Requires:       rc-scripts
65 Provides:       group(%{name})
66 Provides:       user(%{name})
67 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69 %description
70 Speech Dispatcher provides a device independent layer for speech
71 synthesis.
72
73 %description -l pl.UTF-8
74 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
75 obsługującą syntezę mowy.
76
77 %package audio-libao
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}
82
83 %description audio-libao
84 libao audio output module for Speech Dispatcher.
85
86 %description audio-libao -l pl.UTF-8
87 Moduł wyjścia dźwięku libao dla Speech Dispatchera.
88
89 %package audio-nas
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}
94
95 %description audio-nas
96 NAS audio output module for Speech Dispatcher.
97
98 %description audio-nas -l pl.UTF-8
99 Moduł wyjścia dźwięku NAS dla Speech Dispatchera.
100
101 %package audio-pulse
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}
106
107 %description audio-pulse
108 PulseAudio audio output module for Speech Dispatcher.
109
110 %description audio-pulse -l pl.UTF-8
111 Moduł wyjścia dźwięku PulseAudio dla Speech Dispatchera.
112
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}
118
119 %description module-espeak
120 eSpeak synthesizer module for Speech Dispatcher.
121
122 %description module-espeak -l pl.UTF-8
123 Moduł syntezatora eSpeak dla Speech Dispatchera.
124
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}
130
131 %description module-flite
132 Flite synthesizer module for Speech Dispatcher.
133
134 %description module-flite -l pl.UTF-8
135 Moduł syntezatora Flite dla Speech Dispatchera.
136
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}
142
143 %description module-ibmtts
144 IBM TTS synthesizer module for Speech Dispatcher.
145
146 %description module-ibmtts -l pl.UTF-8
147 Moduł syntezatora IBM TTS dla Speech Dispatchera.
148
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}
154
155 %description module-ivona
156 Ivona synthesizer module for Speech Dispatcher.
157
158 %description module-ivona -l pl.UTF-8
159 Moduł syntezatora Ivona dla Speech Dispatchera.
160
161 %package module-pico
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}
166
167 %description module-pico
168 SVOX Pico synthesizer module for Speech Dispatcher.
169
170 %description module-pico -l pl.UTF-8
171 Moduł syntezatora SVOX Pico dla Speech Dispatchera.
172
173 %package libs
174 Summary:        Speech Dispatcher client library
175 Summary(pl.UTF-8):      Biblioteka kliencka Speech Dispatchera
176 Group:          Libraries
177 Requires:       glib2 >= 1:2.28
178
179 %description libs
180 Speech Dispatcher provides a device independent layer for speech
181 synthesis. This package contains client library.
182
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ą.
186
187 %package devel
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
193
194 %description devel
195 Header files for speech-dispatcher library.
196
197 %description devel -l pl.UTF-8
198 Pliki nagłówkowe biblioteki speech-dispatcher.
199
200 %package static
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}
205
206 %description static
207 Static speech-dispatcher library.
208
209 %description static -l pl.UTF-8
210 Statyczna biblioteka speech-dispatcher.
211
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
218
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.
223
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.
228
229 %prep
230 %setup -q
231 %patch0 -p1
232
233 %build
234 %{__libtoolize}
235 %{__aclocal}
236 %{__autoconf}
237 %{__autoheader}
238 %{__automake}
239 %configure \
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}
252
253 %{__make}
254
255 %install
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
259
260 %{__make} install \
261         DESTDIR=$RPM_BUILD_ROOT
262
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
266
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
270 %endif
271 %if %{without ibmtts}
272 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/modules/ibmtts.conf
273 %endif
274
275 %find_lang %{name}
276
277 %clean
278 rm -rf $RPM_BUILD_ROOT
279
280 %pre
281 %groupadd -g 224 %{name}
282 %useradd -u 224 -g 224 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
283
284 %post
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
288
289 %preun
290 if [ "$1" = "0" ]; then
291         %service %{name} stop
292         /sbin/chkconfig --del %{name}
293 fi
294
295 %postun
296 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
297 if [ "$1" = "0" ]; then
298         %userremove %{name}
299         %groupremove %{name}
300 fi
301
302 %post   libs -p /sbin/ldconfig
303 %postun libs -p /sbin/ldconfig
304
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*
345
346 %if %{with libao}
347 %files audio-libao
348 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_libao.so
350 %endif
351
352 %if %{with nas}
353 %files audio-nas
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_nas.so
356 %endif
357
358 %if %{with pulseaudio}
359 %files audio-pulse
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_libdir}/speech-dispatcher/spd_pulse.so
362 %endif
363
364 %if %{with espeak}
365 %files module-espeak
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
369 %endif
370
371 %if %{with flite}
372 %files module-flite
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
376 %endif
377
378 %if %{with ibmtts}
379 %files module-ibmtts
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
383 %endif
384
385 %if %{with ivona}
386 %files module-ivona
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
390 %endif
391
392 %if %{with svox}
393 %files module-pico
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
398 %endif
399
400 %files libs
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/libspeechd.so.*.*.*
403 %attr(755,root,root) %ghost %{_libdir}/libspeechd.so.2
404
405 %files devel
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
411
412 %if %{with static_libs}
413 %files static
414 %defattr(644,root,root,755)
415 %{_libdir}/libspeechd.a
416 %endif
417
418 %if %{with python}
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__
427 %endif
This page took 0.048515 seconds and 2 git commands to generate.