3 %bcond_with ibmtts # commercial, proprietary IBM TTS synthesizer support
4 %bcond_without flite # flite synthetizer support
5 %bcond_without espeak # espeak synthetizer support
6 %bcond_without nas # NAS audio output support
7 %bcond_without alsa # ALSA audio output supprot
8 %bcond_without pulseaudio # pulse audio output support
9 %bcond_without static_libs # don't build static libraries
10 %bcond_without ivona # don't build ivona support
12 Summary: A device independent layer for speech synthesis
13 Summary(pl.UTF-8): Niezależna od urządzenia warstwa obsługująca syntezę mowy
14 Name: speech-dispatcher
18 Group: Applications/Sound
19 Source0: http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
20 # Source0-md5: ccfc30ac006673d36b4223eb760ed696
22 Source2: %{name}.sysconfig
23 Source3: %{name}.tmpfiles
24 Patch0: %{name}-info.patch
26 URL: http://www.freebsoft.org/
27 %{?with_alsa:BuildRequires: alsa-lib-devel}
28 BuildRequires: autoconf
29 BuildRequires: automake
30 BuildRequires: dotconf-devel
31 %{?with_espeak:BuildRequires: espeak-devel}
32 %{?with_flite:BuildRequires: flite-devel}
33 %{?with_ibmtts:BuildRequires: ibmtts-devel}
34 BuildRequires: libatomic_ops
35 %{?with_ivona:BuildRequires: libdumbtts-devel}
36 BuildRequires: libtool
37 %{?with_nas:BuildRequires: nas-devel}
38 BuildRequires: pkgconfig
39 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
40 BuildRequires: python-devel >= 1:2.5
41 BuildRequires: rpm-pythonprov
42 BuildRequires: rpmbuild(macros) >= 1.527
43 BuildRequires: texinfo
44 Requires(post,preun): /sbin/chkconfig
45 Requires(postun): /usr/sbin/groupdel
46 Requires(postun): /usr/sbin/userdel
47 Requires(pre): /bin/id
48 Requires(pre): /usr/bin/getgid
49 Requires(pre): /usr/sbin/groupadd
50 Requires(pre): /usr/sbin/useradd
51 Requires: %{name}-libs = %{version}-%{release}
53 Provides: group(%{name})
54 Provides: user(%{name})
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 Speech Dispatcher provides a device independent layer for speech
61 %description -l pl.UTF-8
62 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
63 obsługującą syntezę mowy.
66 Summary: Speech Dispatcher client library
67 Summary(pl.UTF-8): Biblioteka kliencka Speech Dispatchera
71 Speech Dispatcher provides a device independent layer for speech
72 synthesis. This package contains client library.
74 %description libs -l pl.UTF-8
75 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
76 obsługującą syntezę mowy. Ten pakiet zawiera biblitotekę kliencką.
79 Summary: Header files for speech-dispatcher library
80 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki speech-dispatcher
81 Group: Development/Libraries
82 Requires: %{name}-libs = %{version}-%{release}
85 Header files for speech-dispatcher library.
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe biblioteki speech-dispatcher.
91 Summary: Static speech-dispatcher library
92 Summary(pl.UTF-8): Statyczna biblioteka speech-dispatcher
93 Group: Development/Libraries
94 Requires: %{name}-devel = %{version}-%{release}
97 Static speech-dispatcher library.
99 %description static -l pl.UTF-8
100 Statyczna biblioteka speech-dispatcher.
102 %package -n python-%{name}
103 Summary: Python library for communication with Speech Dispatcher
104 Summary(pl.UTF-8): Biblioteka Pythona do komunikacji ze Speech Dispatcherem
105 Group: Libraries/Python
106 %pyrequires_eq python-modules
108 %description -n python-%{name}
109 Speech Dispatcher provides a device independent layer for speech
110 synthesis. This package contains a Python library for communication
111 with Speech Dispatcher.
113 %description -n python-%{name} -l pl.UTF-8
114 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
115 obsługującą syntezę mowy. Ten pakiet zawiera bibliotekę Pythona do
116 komunikacji ze Speech Dispatcherem.
130 %{__with_without flite} \
131 %{__with_without ibmtts} \
132 %{__with_without espeak} \
133 %{__with_without nas} \
134 %{__with_without alsa} \
135 %{__with_without pulseaudio pulse} \
136 %{__with_without ivona} \
137 %{__enable_disable static_libs static}
142 rm -rf $RPM_BUILD_ROOT
143 install -d $RPM_BUILD_ROOT/var/{log,run}/speech-dispatcher \
144 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
147 DESTDIR=$RPM_BUILD_ROOT
149 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
150 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
151 install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
153 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}/speechd
155 # library for engines output, API not included in -devel
156 rm $RPM_BUILD_ROOT%{_libdir}/speech-dispatcher/libsdaudio.{so,la,a}
159 rm -rf $RPM_BUILD_ROOT
162 %groupadd -g 224 %{name}
163 %useradd -u 224 -g 224 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
166 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
167 /sbin/chkconfig --add %{name}
168 %service %{name} restart
171 if [ "$1" = "0" ]; then
172 %service %{name} stop
173 /sbin/chkconfig --del %{name}
177 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
178 if [ "$1" = "0" ]; then
183 %post libs -p /sbin/ldconfig
184 %postun libs -p /sbin/ldconfig
187 %defattr(644,root,root,755)
188 %doc AUTHORS ChangeLog NEWS README TODO
189 %attr(754,root,root) /etc/rc.d/init.d/%{name}
190 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
191 %attr(755,root,root) %{_bindir}/clibrary
192 %attr(755,root,root) %{_bindir}/clibrary2
193 %attr(755,root,root) %{_bindir}/connection_recovery
194 %attr(755,root,root) %{_bindir}/long_message
195 %attr(755,root,root) %{_bindir}/run_test
196 %attr(755,root,root) %{_bindir}/spd-conf
197 %attr(755,root,root) %{_bindir}/spd-say
198 %attr(755,root,root) %{_bindir}/spdsend
199 %attr(755,root,root) %{_bindir}/speech-dispatcher
200 %dir %{_libdir}/speech-dispatcher
201 %attr(755,root,root) %{_libdir}/speech-dispatcher/libsdaudio.so.*
202 %dir %{_sysconfdir}/speech-dispatcher
203 %dir %{_sysconfdir}/speech-dispatcher/clients
204 %dir %{_sysconfdir}/speech-dispatcher/modules
205 %dir %{_libdir}/speech-dispatcher-modules
206 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_cicero
207 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_dummy
208 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_espeak
209 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_festival
210 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_flite
211 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_generic
212 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_ivona
213 %{_datadir}/speech-dispatcher
214 %{_datadir}/sounds/speech-dispatcher
215 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/speechd.conf
216 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/emacs.conf
217 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/gnome-speech.conf
218 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/cicero.conf
219 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/dtk-generic.conf
220 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/epos-generic.conf
221 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-generic.conf
222 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak-mbrola-generic.conf
223 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/espeak.conf
224 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/festival.conf
225 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/flite.conf
226 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/ibmtts.conf
227 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/ivona.conf
228 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/llia_phon-generic.conf
229 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/swift-generic.conf
230 %dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher
231 %dir %attr(755,%{name},%{name}) /var/log/speech-dispatcher
232 /usr/lib/tmpfiles.d/%{name}.conf
233 %{_infodir}/spd-say.info*
234 %{_infodir}/speech-dispatcher.info*
235 %{_infodir}/ssip.info*
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/libspeechd.so.*.*.*
240 %attr(755,root,root) %ghost %{_libdir}/libspeechd.so.2
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_libdir}/libspeechd.so
245 %{_libdir}/libspeechd.la
246 %{_includedir}/libspeechd.h
248 %if %{with static_libs}
250 %defattr(644,root,root,755)
251 %{_libdir}/libspeechd.a
254 %files -n python-%{name}
255 %defattr(644,root,root,755)
256 %dir %{py_sitedir}/speechd
257 %dir %{py_sitedir}/speechd_config
258 %{py_sitedir}/speechd/*.py[co]
259 %{py_sitedir}/speechd_config/*.py[co]