2 %bcond_with ibmtts # with support comercial, proprietary IBM TTS synthesizer for Linux
3 %bcond_without flite # with flite support
4 %bcond_without espeak # with espeak support
5 %bcond_without nas # with NAS support
6 %bcond_without alsa # with ALSA supprot
7 %bcond_without pulse # with pulse support
8 %bcond_without static_libs # don't build static libraries
10 Summary: A device independent layer for speech synthesis
12 Name: speech-dispatcher
17 Source0: http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz
18 # Source0-md5: bbd7ebc5b0f1b3ec4d89ad66b20d5cea
20 Source2: %{name}.sysconfig
21 Patch0: %{name}-python-install.patch
22 URL: http://www.freebsoft.org/
23 BuildRequires: autoconf
24 BuildRequires: automake
25 BuildRequires: dotconf-devel
26 Buildrequires: libatomic_ops
27 BuildRequires: libtool
28 BuildRequires: rpmbuild(macros) >= 1.228
29 Requires(post,preun): /sbin/chkconfig
30 %{?with_flite:Buildrequires: flite-devel}
31 %{?with_ibmtts:Buildrequires: ibmtts-devel}
32 %{?with_espeak:Buildrequires: espeak-devel}
33 %{?with_nas:Buildrequires: nas-devel}
34 %{?with_alsa:Buildrequires: alsa-lib-devel}
35 %{?with_pulse:Buildrequires: pulseaudio-devel}
36 Provides: group(%{name})
37 Provides: user(%{name})
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Speech Dispatcher provides a device independent layer for speech
44 #description -l pl.UTF-8
47 Summary: Header files for speed-dispatcher library
48 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki speed-dispatcher
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
53 Header files for speed-dispatcher library.
55 %description devel -l pl.UTF-8
56 Pliki nagłówkowe biblioteki speed-dispatcher.
59 Summary: Static speed-dispatcher library
60 Summary(pl.UTF-8): Statyczna biblioteka speed-dispatcher
61 Group: Development/Libraries
62 Requires: %{name}-devel = %{version}-%{release}
65 Static speed-dispatcher library.
67 %description static -l pl.UTF-8
68 Statyczna biblioteka speed-dispatcher.
70 %package -n python-%{name}
71 Summary: Python library for communication with Speech Dispatcher
72 #Summary(pl_PL.UTF-8):
73 Group: Libraries/Python
74 %pyrequires_eq python-modules
76 %description -n python-%{name}
77 Speech Dispatcher provides a device independent layer for speech
78 synthesis. This package contains a Python library for communication
79 with Speech Dispatcher.
81 #description -n python-%{name} -l pl_PL.UTF-8
94 %{?with_flite:--with-flite}%{!?with_flite:--without-flite} \
95 %{?with_ibmtts:--with-ibmtts}%{!?with_ibmtts:--without-ibmtts} \
96 %{?with_espeak:--with-espeak}%{!?with_espeak:--without-espeak} \
97 %{?with_nas:--with-nas}%{!?with_nas:--without-nas} \
98 %{?with_alsa:--with-alsa}%{!?with_alsa:--without-alsa} \
99 %{?with_pulse:--with-pulse}%{!?with_pulse:--without-pulse} \
100 --enable-static=%{?with_static_libs:yes}%{!?with_static_libs:no}
105 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT/var/{log,run}/speech-dispatcher
110 DESTDIR=$RPM_BUILD_ROOT
112 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
113 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
116 rm -rf $RPM_BUILD_ROOT
119 %groupadd -g 223 %{name}
120 %useradd -u 223 -g 223 -G audio -d /usr/share/empty -s /bin/false -c "%{name} user" %{name}
124 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
125 /sbin/chkconfig --add %{name}
126 %service %{name} restart
129 if [ "$1" = "0" ]; then
130 %service %{name} stop
131 /sbin/chkconfig --del %{name}
136 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
137 if [ "$1" = "0" ]; then
143 %defattr(644,root,root,755)
144 %doc AUTHORS ChangeLog NEWS README TODO
145 %attr(754,root,root) /etc/rc.d/init.d/%{name}
146 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
147 %attr(755,root,root) %{_bindir}/*
148 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
149 %dir %{_libdir}/speech-dispatcher
150 %attr(755,root,root) %{_libdir}/speech-dispatcher/lib*.so.*.*.*
152 %attr(755,root,root) %{_libdir}/speech-dispatcher/lib*.so.[^.]
153 %dir %{_sysconfdir}/speech-dispatcher
154 %dir %{_sysconfdir}/speech-dispatcher/clients
155 %dir %{_sysconfdir}/speech-dispatcher/modules
156 %dir %{_libdir}/speech-dispatcher-modules
157 %attr(755,root,root) %{_libdir}/speech-dispatcher-modules/sd_*
158 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/*.conf
159 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/clients/*.conf
160 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/speech-dispatcher/modules/*.conf
161 %dir %attr(755,%{name},%{name}) /var/run/speech-dispatcher
162 %dir %attr(755,%{name},%{name}) /var/log/speech-dispatcher
163 %{_infodir}/spd-say.info*
164 %lang(cs) %{_infodir}/speech-dispatcher-cs.info*
165 %{_infodir}/speech-dispatcher.info*
166 %{_infodir}/ssip.info*
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/lib*.so
172 %{_libdir}/speech-dispatcher/lib*.so
173 %{_libdir}/speech-dispatcher/lib*.la
176 %if %{with static_libs}
178 %defattr(644,root,root,755)
180 %{_libdir}/speech-dispatcher/lib*.a
183 %files -n python-%{name}
184 %defattr(644,root,root,755)
185 %dir %{py_sitescriptdir}/speechd
186 %{py_sitescriptdir}/speechd/*.py[c]