]> git.pld-linux.org Git - packages/speech-dispatcher.git/blame - speech-dispatcher.spec
- python3 rebuild
[packages/speech-dispatcher.git] / speech-dispatcher.spec
CommitLineData
73bed315 1# TODO: think about default configuration (DefaultModule is espeak, which is not loaded by default)
de0cb8a8 2#
28b37384 3# Conditional build:
73bed315 4%bcond_with ibmtts # IBM TTS synthesizer support (commercial, proprietary)
8b9cbd5f
JB
5%bcond_without espeak # eSpeak synthesizer support
6%bcond_without flite # Flite synthesizer support
7%bcond_without ivona # Ivona synthesizer support
f0bc316e 8%bcond_without svox # SVOX Pico synthesizer support
93ca17ef 9%bcond_without alsa # ALSA audio output supprot
73bed315 10%bcond_without libao # libao audio output supprot
4cf58c26 11%bcond_without nas # NAS audio output support
835877b3 12%bcond_without pulseaudio # pulse audio output support
73bed315 13%bcond_without python # Python 3 binding (python 2.x no longer supported)
de0cb8a8 14%bcond_without static_libs # don't build static libraries
28b37384 15#
16Summary: A device independent layer for speech synthesis
de0cb8a8 17Summary(pl.UTF-8): Niezależna od urządzenia warstwa obsługująca syntezę mowy
28b37384 18Name: speech-dispatcher
37fb4489 19Version: 0.8.1
95c278be 20Release: 3
28b37384 21License: GPL v2
de0cb8a8 22Group: Applications/Sound
28b37384 23Source0: http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
37fb4489 24# Source0-md5: c219820f6c10ee5a591cb4a93949930c
162dab2c 25Source1: %{name}.init
26Source2: %{name}.sysconfig
dbfacddb 27Source3: %{name}.tmpfiles
835877b3 28Patch0: %{name}-info.patch
28b37384 29URL: http://www.freebsoft.org/
44e46910 30%{?with_alsa:BuildRequires: alsa-lib-devel}
73bed315 31BuildRequires: autoconf >= 2.63
168868f0
JB
32# for __pycache__ support (python 3.2+)
33BuildRequires: automake >= 1:1.13
73bed315 34BuildRequires: dotconf-devel >= 1.3
44e46910 35%{?with_espeak:BuildRequires: espeak-devel}
73bed315 36BuildRequires: glib2-devel >= 1:2.28
44e46910 37%{?with_flite:BuildRequires: flite-devel}
38%{?with_ibmtts:BuildRequires: ibmtts-devel}
73bed315 39BuildRequires: intltool >= 0.40.0
44e46910 40BuildRequires: libatomic_ops
44e46910 41%{?with_ivona:BuildRequires: libdumbtts-devel}
73bed315 42%{?with_libao:BuildRequires: libao-devel}
a6cb3d1a 43BuildRequires: libsndfile-devel >= 1.0.2
73bed315 44BuildRequires: libtool >= 2:2.2
44e46910 45%{?with_nas:BuildRequires: nas-devel}
3da736bf 46BuildRequires: pkgconfig
59135ce9 47%{?with_pulseaudio:BuildRequires: pulseaudio-devel}
73bed315 48%{?with_python:BuildRequires: python3-devel >= 1:3.2}
93ca17ef 49BuildRequires: rpm-pythonprov
7f679c05 50BuildRequires: rpmbuild(macros) >= 1.527
f0bc316e 51%{?with_svox:BuildRequires: svox-devel}
93ca17ef 52BuildRequires: texinfo
73bed315 53%{?with_nas:BuildRequires: xorg-lib-libXau-devel}
59135ce9
ER
54Requires(post,preun): /sbin/chkconfig
55Requires(postun): /usr/sbin/groupdel
56Requires(postun): /usr/sbin/userdel
93ca17ef
JB
57Requires(pre): /bin/id
58Requires(pre): /usr/bin/getgid
59Requires(pre): /usr/sbin/groupadd
60Requires(pre): /usr/sbin/useradd
93ca17ef 61Requires: %{name}-libs = %{version}-%{release}
73bed315 62Requires: dotconf >= 1.3
a6cb3d1a 63Requires: libsndfile >= 1.0.2
93ca17ef 64Requires: rc-scripts
162dab2c 65Provides: group(%{name})
66Provides: user(%{name})
28b37384 67BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69%description
70Speech Dispatcher provides a device independent layer for speech
71synthesis.
72
de0cb8a8
JB
73%description -l pl.UTF-8
74Speech Dispatcher zapewnia niezależną od urządzenia warstwę
75obsługującą syntezę mowy.
28b37384 76
73bed315
JB
77%package audio-libao
78Summary: libao audio output module for Speech Dispatcher
79Summary(pl.UTF-8): Moduł wyjścia dźwięku libao dla Speech Dispatchera
80Group: Applications/Sound
81Requires: %{name} = %{version}-%{release}
82
83%description audio-libao
84libao audio output module for Speech Dispatcher.
85
86%description audio-libao -l pl.UTF-8
87Moduł wyjścia dźwięku libao dla Speech Dispatchera.
88
89%package audio-nas
90Summary: NAS audio output module for Speech Dispatcher
91Summary(pl.UTF-8): Moduł wyjścia dźwięku NAS dla Speech Dispatchera
92Group: Applications/Sound
93Requires: %{name} = %{version}-%{release}
94
95%description audio-nas
96NAS audio output module for Speech Dispatcher.
97
98%description audio-nas -l pl.UTF-8
99Moduł wyjścia dźwięku NAS dla Speech Dispatchera.
100
101%package audio-pulse
102Summary: PulseAudio audio output module for Speech Dispatcher
103Summary(pl.UTF-8): Moduł wyjścia dźwięku PulseAudio dla Speech Dispatchera
104Group: Applications/Sound
105Requires: %{name} = %{version}-%{release}
106
107%description audio-pulse
108PulseAudio audio output module for Speech Dispatcher.
109
110%description audio-pulse -l pl.UTF-8
111Moduł wyjścia dźwięku PulseAudio dla Speech Dispatchera.
112
4cf58c26 113%package module-espeak
8b9cbd5f 114Summary: eSpeak synthesizer module for Speech Dispatcher
4cf58c26
JB
115Summary(pl.UTF-8): Moduł syntezatora eSpeak dla Speech Dispatchera
116Group: Applications/Sound
117Requires: %{name} = %{version}-%{release}
118
119%description module-espeak
8b9cbd5f 120eSpeak synthesizer module for Speech Dispatcher.
4cf58c26
JB
121
122%description module-espeak -l pl.UTF-8
123Moduł syntezatora eSpeak dla Speech Dispatchera.
124
125%package module-flite
8b9cbd5f 126Summary: Flite synthesizer module for Speech Dispatcher
4cf58c26
JB
127Summary(pl.UTF-8): Moduł syntezatora Flite dla Speech Dispatchera
128Group: Applications/Sound
129Requires: %{name} = %{version}-%{release}
130
131%description module-flite
8b9cbd5f 132Flite synthesizer module for Speech Dispatcher.
4cf58c26
JB
133
134%description module-flite -l pl.UTF-8
135Moduł syntezatora Flite dla Speech Dispatchera.
136
137%package module-ibmtts
8b9cbd5f 138Summary: IBM TTS synthesizer module for Speech Dispatcher
4cf58c26
JB
139Summary(pl.UTF-8): Moduł syntezatora IBM TTS dla Speech Dispatchera
140Group: Applications/Sound
141Requires: %{name} = %{version}-%{release}
142
143%description module-ibmtts
8b9cbd5f 144IBM TTS synthesizer module for Speech Dispatcher.
4cf58c26
JB
145
146%description module-ibmtts -l pl.UTF-8
147Moduł syntezatora IBM TTS dla Speech Dispatchera.
148
149%package module-ivona
8b9cbd5f 150Summary: Ivona synthesizer module for Speech Dispatcher
4cf58c26
JB
151Summary(pl.UTF-8): Moduł syntezatora Ivona dla Speech Dispatchera
152Group: Applications/Sound
153Requires: %{name} = %{version}-%{release}
154
155%description module-ivona
8b9cbd5f 156Ivona synthesizer module for Speech Dispatcher.
4cf58c26
JB
157
158%description module-ivona -l pl.UTF-8
159Moduł syntezatora Ivona dla Speech Dispatchera.
160
f0bc316e
JB
161%package module-pico
162Summary: SVOX Pico synthesizer module for Speech Dispatcher
163Summary(pl.UTF-8): Moduł syntezatora SVOX Pico dla Speech Dispatchera
164Group: Applications/Sound
165Requires: %{name} = %{version}-%{release}
166
167%description module-pico
168SVOX Pico synthesizer module for Speech Dispatcher.
169
170%description module-pico -l pl.UTF-8
171Moduł syntezatora SVOX Pico dla Speech Dispatchera.
172
93ca17ef
JB
173%package libs
174Summary: Speech Dispatcher client library
175Summary(pl.UTF-8): Biblioteka kliencka Speech Dispatchera
176Group: Libraries
73bed315 177Requires: glib2 >= 1:2.28
93ca17ef
JB
178
179%description libs
180Speech Dispatcher provides a device independent layer for speech
181synthesis. This package contains client library.
182
183%description libs -l pl.UTF-8
184Speech Dispatcher zapewnia niezależną od urządzenia warstwę
185obsługującą syntezę mowy. Ten pakiet zawiera biblitotekę kliencką.
186
28b37384 187%package devel
de0cb8a8
JB
188Summary: Header files for speech-dispatcher library
189Summary(pl.UTF-8): Pliki nagłówkowe biblioteki speech-dispatcher
28b37384 190Group: Development/Libraries
93ca17ef 191Requires: %{name}-libs = %{version}-%{release}
73bed315 192Requires: glib2-devel >= 1:2.28
28b37384 193
194%description devel
de0cb8a8 195Header files for speech-dispatcher library.
28b37384 196
197%description devel -l pl.UTF-8
de0cb8a8 198Pliki nagłówkowe biblioteki speech-dispatcher.
28b37384 199
200%package static
de0cb8a8
JB
201Summary: Static speech-dispatcher library
202Summary(pl.UTF-8): Statyczna biblioteka speech-dispatcher
28b37384 203Group: Development/Libraries
204Requires: %{name}-devel = %{version}-%{release}
205
206%description static
de0cb8a8 207Static speech-dispatcher library.
28b37384 208
209%description static -l pl.UTF-8
de0cb8a8 210Statyczna biblioteka speech-dispatcher.
28b37384 211
73bed315
JB
212%package -n python3-%{name}
213Summary: Python 3 library for communication with Speech Dispatcher
214Summary(pl.UTF-8): Biblioteka Pythona 3 do komunikacji ze Speech Dispatcherem
b4140df7 215Group: Libraries/Python
73bed315
JB
216Requires: python3-modules
217Obsoletes: python-speech-dispatcher
b4140df7 218
73bed315 219%description -n python3-%{name}
b4140df7 220Speech Dispatcher provides a device independent layer for speech
73bed315 221synthesis. This package contains a Python 3 library for communication
b4140df7 222with Speech Dispatcher.
223
73bed315 224%description -n python3-%{name} -l pl.UTF-8
de0cb8a8 225Speech Dispatcher zapewnia niezależną od urządzenia warstwę
73bed315 226obsługującą syntezę mowy. Ten pakiet zawiera bibliotekę Pythona 3 do
de0cb8a8 227komunikacji ze Speech Dispatcherem.
b4140df7 228
28b37384 229%prep
230%setup -q
b45d13c8 231%patch0 -p1
28b37384 232
233%build
234%{__libtoolize}
235%{__aclocal}
236%{__autoconf}
237%{__autoheader}
238%{__automake}
239%configure \
73bed315
JB
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} \
835877b3
AF
245 %{__with_without flite} \
246 %{__with_without ibmtts} \
835877b3 247 %{__with_without ivona} \
73bed315
JB
248 %{__with_without libao} \
249 %{__with_without nas} \
f0bc316e
JB
250 %{__with_without pulseaudio pulse} \
251 %{__with_without svox pico}
28b37384 252
253%{__make}
254
255%install
256rm -rf $RPM_BUILD_ROOT
dbfacddb
JR
257install -d $RPM_BUILD_ROOT/var/{log,run}/speech-dispatcher \
258 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
162dab2c 259
28b37384 260%{__make} install \
261 DESTDIR=$RPM_BUILD_ROOT
262
162dab2c 263install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
264install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
dbfacddb 265install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
162dab2c 266
73bed315
JB
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}
93ca17ef 276
28b37384 277%clean
278rm -rf $RPM_BUILD_ROOT
279
162dab2c 280%pre
66b2a9e1 281%groupadd -g 224 %{name}
282%useradd -u 224 -g 224 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
162dab2c 283
b4140df7 284%post
b4140df7 285[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
162dab2c 286/sbin/chkconfig --add %{name}
287%service %{name} restart
288
289%preun
290if [ "$1" = "0" ]; then
291 %service %{name} stop
292 /sbin/chkconfig --del %{name}
293fi
b4140df7 294
295%postun
b4140df7 296[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
162dab2c 297if [ "$1" = "0" ]; then
298 %userremove %{name}
299 %groupremove %{name}
300fi
b4140df7 301
93ca17ef
JB
302%post libs -p /sbin/ldconfig
303%postun libs -p /sbin/ldconfig
304
73bed315 305%files -f %{name}.lang
28b37384 306%defattr(644,root,root,755)
48a0efe4 307%doc AUTHORS ChangeLog NEWS README TODO
162dab2c 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}
835877b3
AF
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
b4140df7 314%dir %{_libdir}/speech-dispatcher
73bed315
JB
315%{?with_alsa:%attr(755,root,root) %{_libdir}/speech-dispatcher/spd_alsa.so}
316%{_libdir}/speech-dispatcher/spd_oss.so
b4140df7 317%dir %{_libdir}/speech-dispatcher-modules
835877b3
AF
318%attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_cicero
319%attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_dummy
835877b3 320%attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_festival
835877b3 321%attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_generic
835877b3
AF
322%{_datadir}/speech-dispatcher
323%{_datadir}/sounds/speech-dispatcher
73bed315 324%dir %{_sysconfdir}/speech-dispatcher
835877b3 325%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/speechd.conf
73bed315 326%dir %{_sysconfdir}/speech-dispatcher/clients
835877b3
AF
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
73bed315 329%dir %{_sysconfdir}/speech-dispatcher/modules
835877b3
AF
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
835877b3 335%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/festival.conf
835877b3
AF
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
162dab2c 338%dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher
3ef6373a 339%dir %attr(755,%{name},%{name}) /var/log/speech-dispatcher
dbfacddb 340/usr/lib/tmpfiles.d/%{name}.conf
404d22f5 341%{_infodir}/spd-say.info*
404d22f5 342%{_infodir}/speech-dispatcher.info*
089f4e80 343%lang(cs) %{_infodir}/speech-dispatcher-cs.info*
404d22f5 344%{_infodir}/ssip.info*
28b37384 345
73bed315
JB
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
4cf58c26
JB
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
f0bc316e
JB
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
37fb4489 397%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/pico-generic.conf
f0bc316e
JB
398%endif
399
93ca17ef
JB
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
28b37384 405%files devel
406%defattr(644,root,root,755)
93ca17ef
JB
407%attr(755,root,root) %{_libdir}/libspeechd.so
408%{_libdir}/libspeechd.la
73bed315
JB
409%{_includedir}/speech-dispatcher
410%{_pkgconfigdir}/speech-dispatcher.pc
28b37384 411
b4140df7 412%if %{with static_libs}
28b37384 413%files static
414%defattr(644,root,root,755)
93ca17ef 415%{_libdir}/libspeechd.a
b4140df7 416%endif
48a0efe4 417
73bed315
JB
418%if %{with python}
419%files -n python3-%{name}
b4140df7 420%defattr(644,root,root,755)
73bed315
JB
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.134467 seconds and 4 git commands to generate.