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 pulse # pulse audio output support
9 %bcond_without static_libs # don't build static libraries
11 Summary: A device independent layer for speech synthesis
12 Summary(pl.UTF-8): Niezależna od urządzenia warstwa obsługująca syntezę mowy
13 Name: speech-dispatcher
17 Group: Applications/Sound
18 Source0: http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
19 # Source0-md5: 67432ad655b50fd7c1f1f79e012cfe3f
21 Source2: %{name}.sysconfig
22 Patch0: %{name}-python-install.patch
23 Patch1: %{name}-info.patch
24 Patch2: %{name}-gcc.patch
25 URL: http://www.freebsoft.org/
26 %{?with_alsa:Buildrequires: alsa-lib-devel}
27 BuildRequires: autoconf
28 BuildRequires: automake
29 BuildRequires: dotconf-devel
30 %{?with_espeak:Buildrequires: espeak-devel}
31 %{?with_flite:Buildrequires: flite-devel}
32 %{?with_ibmtts:Buildrequires: ibmtts-devel}
33 Buildrequires: libatomic_ops
34 BuildRequires: libtool
35 %{?with_nas:Buildrequires: nas-devel}
36 %{?with_pulse:Buildrequires: pulseaudio-devel}
37 BuildRequires: python-devel >= 1:2.5
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.228
40 BuildRequires: texinfo
41 Requires(pre): /bin/id
42 Requires(pre): /usr/bin/getgid
43 Requires(pre): /usr/sbin/groupadd
44 Requires(pre): /usr/sbin/useradd
45 Requires(post,preun): /sbin/chkconfig
46 Requires(postun): /usr/sbin/groupdel
47 Requires(postun): /usr/sbin/userdel
48 Requires: %{name}-libs = %{version}-%{release}
50 Provides: group(%{name})
51 Provides: user(%{name})
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 Speech Dispatcher provides a device independent layer for speech
58 %description -l pl.UTF-8
59 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
60 obsługującą syntezę mowy.
63 Summary: Speech Dispatcher client library
64 Summary(pl.UTF-8): Biblioteka kliencka Speech Dispatchera
68 Speech Dispatcher provides a device independent layer for speech
69 synthesis. This package contains client library.
71 %description libs -l pl.UTF-8
72 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
73 obsługującą syntezę mowy. Ten pakiet zawiera biblitotekę kliencką.
76 Summary: Header files for speech-dispatcher library
77 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki speech-dispatcher
78 Group: Development/Libraries
79 Requires: %{name}-libs = %{version}-%{release}
82 Header files for speech-dispatcher library.
84 %description devel -l pl.UTF-8
85 Pliki nagłówkowe biblioteki speech-dispatcher.
88 Summary: Static speech-dispatcher library
89 Summary(pl.UTF-8): Statyczna biblioteka speech-dispatcher
90 Group: Development/Libraries
91 Requires: %{name}-devel = %{version}-%{release}
94 Static speech-dispatcher library.
96 %description static -l pl.UTF-8
97 Statyczna biblioteka speech-dispatcher.
99 %package -n python-%{name}
100 Summary: Python library for communication with Speech Dispatcher
101 Summary(pl_PL.UTF-8): Biblioteka Pythona do komunikacji ze Speech Dispatcherem
102 Group: Libraries/Python
103 %pyrequires_eq python-modules
105 %description -n python-%{name}
106 Speech Dispatcher provides a device independent layer for speech
107 synthesis. This package contains a Python library for communication
108 with Speech Dispatcher.
110 %description -n python-%{name} -l pl_PL.UTF-8
111 Speech Dispatcher zapewnia niezależną od urządzenia warstwę
112 obsługującą syntezę mowy. Ten pakiet zawiera bibliotekę Pythona do
113 komunikacji ze Speech Dispatcherem.
128 %{?with_flite:--with-flite}%{!?with_flite:--without-flite} \
129 %{?with_ibmtts:--with-ibmtts}%{!?with_ibmtts:--without-ibmtts} \
130 %{?with_espeak:--with-espeak}%{!?with_espeak:--without-espeak} \
131 %{?with_nas:--with-nas}%{!?with_nas:--without-nas} \
132 %{?with_alsa:--with-alsa}%{!?with_alsa:--without-alsa} \
133 %{?with_pulse:--with-pulse}%{!?with_pulse:--without-pulse} \
134 --enable-static=%{?with_static_libs:yes}%{!?with_static_libs:no}
139 rm -rf $RPM_BUILD_ROOT
141 install -d $RPM_BUILD_ROOT/var/{log,run}/speech-dispatcher
144 DESTDIR=$RPM_BUILD_ROOT
146 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
147 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
149 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}/speechd
151 # library for engines output, API not included in -devel
152 rm $RPM_BUILD_ROOT%{_libdir}/speech-dispatcher/libsdaudio.{so,la,a}
155 rm -rf $RPM_BUILD_ROOT
158 %groupadd -g 224 %{name}
159 %useradd -u 224 -g 224 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
162 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
163 /sbin/chkconfig --add %{name}
164 %service %{name} restart
167 if [ "$1" = "0" ]; then
168 %service %{name} stop
169 /sbin/chkconfig --del %{name}
173 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
174 if [ "$1" = "0" ]; then
179 %post libs -p /sbin/ldconfig
180 %postun libs -p /sbin/ldconfig
183 %defattr(644,root,root,755)
184 %doc AUTHORS ChangeLog NEWS README TODO
185 %attr(754,root,root) /etc/rc.d/init.d/%{name}
186 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
187 %attr(755,root,root) %{_bindir}/*
188 %dir %{_libdir}/speech-dispatcher
189 %attr(755,root,root) %{_libdir}/speech-dispatcher/libsdaudio.so.*
190 %dir %{_sysconfdir}/speech-dispatcher
191 %dir %{_sysconfdir}/speech-dispatcher/clients
192 %dir %{_sysconfdir}/speech-dispatcher/modules
193 %dir %{_libdir}/speech-dispatcher-modules
194 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_*
195 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/*.conf
196 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/*.conf
197 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/*.conf
198 %dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher
199 %dir %attr(755,%{name},%{name}) /var/log/speech-dispatcher
200 %{_infodir}/spd-say.info*
201 %lang(cs) %{_infodir}/speech-dispatcher-cs.info*
202 %{_infodir}/speech-dispatcher.info*
203 %{_infodir}/ssip.info*
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_libdir}/libspeechd.so.*.*.*
208 %attr(755,root,root) %ghost %{_libdir}/libspeechd.so.2
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_libdir}/libspeechd.so
213 %{_libdir}/libspeechd.la
214 %{_includedir}/libspeechd.h
216 %if %{with static_libs}
218 %defattr(644,root,root,755)
219 %{_libdir}/libspeechd.a
222 %files -n python-%{name}
223 %defattr(644,root,root,755)
224 %dir %{py_sitescriptdir}/speechd
225 %{py_sitescriptdir}/speechd/*.py[co]
226 %{py_sitescriptdir}/speechd-*.egg-info