1 | %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
---|
2 | |
---|
3 | %define with_nas 1 |
---|
4 | %define with_pulse 1 |
---|
5 | %define with_flite 1 |
---|
6 | |
---|
7 | Name: speech-dispatcher |
---|
8 | Version: 0.7.1 |
---|
9 | Release: 1%{?_dist_release} |
---|
10 | Summary: To provide a high-level device independent layer for speech synthesis |
---|
11 | Group: System Environment/Libraries |
---|
12 | |
---|
13 | # Almost all files are under GPLv2+, however |
---|
14 | # src/c/clients/spdsend/spdsend.h is licensed under GPLv2, |
---|
15 | # which makes %%_bindir/spdsend GPLv2. |
---|
16 | License: GPLv2+ and GPLv2 |
---|
17 | URL: http://www.freebsoft.org/pub/projects/speechd/ |
---|
18 | Source0: http://www.freebsoft.org/pub/projects/speechd/%{name}-%{version}.tar.gz |
---|
19 | Source1: http://www.nsitonline.in/hemant/stuff/speechd-rpm/speech-dispatcherd |
---|
20 | |
---|
21 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
22 | BuildRequires: python-setuptools |
---|
23 | BuildRequires: espeak-devel |
---|
24 | BuildRequires: alsa-lib-devel |
---|
25 | BuildRequires: dotconf-devel |
---|
26 | BuildRequires: texinfo |
---|
27 | BuildRequires: libraw1394-devel |
---|
28 | Buildrequires: pulseaudio-lib-devel |
---|
29 | Buildrequires: glib2-devel |
---|
30 | BuildRequires: flite-devel |
---|
31 | Buildrequires: nas-devel |
---|
32 | |
---|
33 | Requires(post): /sbin/chkconfig |
---|
34 | Requires(preun): /sbin/chkconfig /sbin/service |
---|
35 | Requires(postun): /sbin/service |
---|
36 | |
---|
37 | %description |
---|
38 | * Common interface to different TTS engines |
---|
39 | * Handling concurrent synthesis requests – requests may come |
---|
40 | asynchronously from multiple sources within an application |
---|
41 | and/or from more different applications. |
---|
42 | * Subsequent serialization, resolution of conflicts and |
---|
43 | priorities of incoming requests |
---|
44 | * Context switching – state is maintained for each client |
---|
45 | connection independently, event for connections from |
---|
46 | within one application. |
---|
47 | * High-level client interfaces for popular programming languages |
---|
48 | * Common sound output handling – audio playback is handled by |
---|
49 | Speech Dispatcher rather than the TTS engine, since most engines |
---|
50 | have limited sound output capabilities. |
---|
51 | |
---|
52 | %package devel |
---|
53 | Summary: Development files for %{name} |
---|
54 | Group: Development/Libraries |
---|
55 | Requires: speech-dispatcher = %{version}-%{release} |
---|
56 | License: GPLv2+ |
---|
57 | |
---|
58 | %description devel |
---|
59 | The %{name}-devel package contains libraries and header files for |
---|
60 | developing applications that use %{name}. |
---|
61 | |
---|
62 | %package doc |
---|
63 | Summary: Documentation for speech-dispatcher |
---|
64 | License: GPLv2+ |
---|
65 | Group: Applications/Documentation |
---|
66 | Requires: speech-dispatcher = %{version}-%{release} |
---|
67 | Requires(post): /sbin/install-info |
---|
68 | Requires(preun):/sbin/install-info |
---|
69 | |
---|
70 | %description doc |
---|
71 | speechd documentation |
---|
72 | |
---|
73 | %package python |
---|
74 | Summary: Python Client API for speech-dispatcher |
---|
75 | License: GPLv2+ |
---|
76 | Group: Development/Libraries |
---|
77 | Requires: speech-dispatcher = %{version}-%{release} |
---|
78 | |
---|
79 | %description python |
---|
80 | speechd python module |
---|
81 | |
---|
82 | %prep |
---|
83 | %setup -q |
---|
84 | |
---|
85 | %build |
---|
86 | iconv -f ISO-8859-2 -t UTF-8 doc/speech-dispatcher-cs.texi -o doc/speech-dispatcher-cs_c.texi |
---|
87 | mv doc/speech-dispatcher-cs_c.texi doc/speech-dispatcher-cs.texi |
---|
88 | |
---|
89 | %configure --disable-static --with-alsa --with-pulse --without-flite --sysconfdir=%{_sysconfdir} |
---|
90 | |
---|
91 | make %{?_smp_mflags} |
---|
92 | |
---|
93 | %install |
---|
94 | rm -rf $RPM_BUILD_ROOT |
---|
95 | |
---|
96 | for dir in \ |
---|
97 | config/ doc/ src/audio/ src/c/ src/modules/ src/tests/ src/server/ src/python/ |
---|
98 | do |
---|
99 | pushd $dir |
---|
100 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" |
---|
101 | popd |
---|
102 | done |
---|
103 | |
---|
104 | #Install the init shell script |
---|
105 | mkdir -p $RPM_BUILD_ROOT%{_initrddir} |
---|
106 | install -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/ |
---|
107 | |
---|
108 | #Rename certain generically named binaries |
---|
109 | mv $RPM_BUILD_ROOT%{_bindir}/long_message $RPM_BUILD_ROOT%{_bindir}/spd_long_message |
---|
110 | mv $RPM_BUILD_ROOT%{_bindir}/run_test $RPM_BUILD_ROOT%{_bindir}/spd_run_test |
---|
111 | |
---|
112 | #Remove %{_infodir}/dir file |
---|
113 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
---|
114 | |
---|
115 | cd ../../ |
---|
116 | find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' |
---|
117 | |
---|
118 | # Move the config files from /usr/share to /etc |
---|
119 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/clients |
---|
120 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/modules |
---|
121 | mv $RPM_BUILD_ROOT%{_datadir}/speech-dispatcher/conf/speechd.conf $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/ |
---|
122 | mv $RPM_BUILD_ROOT%{_datadir}/speech-dispatcher/conf/clients/* $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/clients |
---|
123 | mv $RPM_BUILD_ROOT%{_datadir}/speech-dispatcher/conf/modules/* $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/modules |
---|
124 | |
---|
125 | # Now move the files, change ownerships, apply setuid settings incase build is for |
---|
126 | # olpc. |
---|
127 | |
---|
128 | #if 0%{?olpc} |
---|
129 | # #Move the speech-dispatcher configuration files to olpc writable location. |
---|
130 | # mkdir -p $RPM_BUILD_ROOT/home/olpc/.speechd |
---|
131 | # mv $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/* $RPM_BUILD_ROOT/home/olpc/.speechd |
---|
132 | #endif |
---|
133 | |
---|
134 | # Remove dummy sound |
---|
135 | rm -rf $RPM_BUILD_ROOT/%{_datadir}/sounds/ |
---|
136 | |
---|
137 | # Create log dir |
---|
138 | mkdir -p -m 0700 $RPM_BUILD_ROOT%{_localstatedir}/log/speech-dispatcher/ |
---|
139 | |
---|
140 | %clean |
---|
141 | rm -rf $RPM_BUILD_ROOT |
---|
142 | |
---|
143 | %post |
---|
144 | /sbin/ldconfig |
---|
145 | /sbin/chkconfig --add speech-dispatcherd |
---|
146 | |
---|
147 | %postun |
---|
148 | /sbin/ldconfig |
---|
149 | |
---|
150 | if [ "$1" -ge "1" ] ; then |
---|
151 | /sbin/service speech-dispatcherd condrestart >/dev/null 2>&1 || : |
---|
152 | fi |
---|
153 | |
---|
154 | %preun |
---|
155 | if [ $1 = 0 ] ; then |
---|
156 | /sbin/service speech-dispatcherd stop >/dev/null 2>&1 |
---|
157 | /sbin/chkconfig --del speech-dispatcherd |
---|
158 | fi |
---|
159 | |
---|
160 | %post doc |
---|
161 | /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : |
---|
162 | /sbin/install-info %{_infodir}/spd-say.info %{_infodir}/dir || : |
---|
163 | /sbin/install-info %{_infodir}/ssip.info %{_infodir}/dir || : |
---|
164 | /sbin/install-info %{_infodir}/%{name}-cs.info %{_infodir}/dir || : |
---|
165 | |
---|
166 | %preun doc |
---|
167 | if [ $1 = 0 ]; then |
---|
168 | /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : |
---|
169 | /sbin/install-info --delete %{_infodir}/spd-say.info %{_infodir}/dir || : |
---|
170 | /sbin/install-info --delete %{_infodir}/ssip.info %{_infodir}/dir || : |
---|
171 | /sbin/install-info --delete %{_infodir}/%{name}-cs.info %{_infodir}/dir || : |
---|
172 | fi |
---|
173 | |
---|
174 | |
---|
175 | %files |
---|
176 | %defattr(-,root,root,-) |
---|
177 | %doc AUTHORS ChangeLog NEWS README TODO COPYING |
---|
178 | %config(noreplace) %{_sysconfdir}/speech-dispatcher/speechd.conf |
---|
179 | %config(noreplace) %{_sysconfdir}/speech-dispatcher/clients/*.conf |
---|
180 | %config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/*.conf |
---|
181 | %dir %{_sysconfdir}/speech-dispatcher/ |
---|
182 | %dir %{_sysconfdir}/speech-dispatcher/clients |
---|
183 | %dir %{_sysconfdir}/speech-dispatcher/modules |
---|
184 | |
---|
185 | %{_bindir}/* |
---|
186 | %{_libdir}/speech-dispatcher-modules/sd_* |
---|
187 | %dir %{_libdir}/speech-dispatcher-modules |
---|
188 | |
---|
189 | %{_libdir}/libspeechd.so.* |
---|
190 | %dir %{_libdir}/speech-dispatcher |
---|
191 | %{_libdir}/speech-dispatcher/lib*.so |
---|
192 | %{_libdir}/speech-dispatcher/libsdaudio.so.* |
---|
193 | |
---|
194 | %dir %attr(0700, root, root) %{_localstatedir}/log/speech-dispatcher/ |
---|
195 | %attr(0755,root,root)%{_initrddir}/speech-dispatcherd |
---|
196 | |
---|
197 | %files devel |
---|
198 | %defattr(-,root,root,-) |
---|
199 | %{_includedir}/* |
---|
200 | %{_libdir}/lib*.so |
---|
201 | |
---|
202 | %files doc |
---|
203 | %defattr(-,root,root,-) |
---|
204 | %{_infodir}/* |
---|
205 | |
---|
206 | %files python |
---|
207 | %defattr(-,root,root,-) |
---|
208 | %{python_sitearch}/speechd* |
---|
209 | |
---|
210 | %changelog |
---|
211 | * Sat Nov 05 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.7.1-1 |
---|
212 | - new upstream release |
---|
213 | - remove all patches |
---|
214 | |
---|
215 | * Sun Mar 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.6.7-5 |
---|
216 | - Initial build for Vine Linux |
---|
217 | |
---|
218 | * Wed Mar 3 2010 Peter Robinson <pbrobinson@gmail.com> - 0.6.7-4 |
---|
219 | - Add patch to fix dso linking. Bug 564851 |
---|
220 | |
---|
221 | * Sat Jan 9 2010 Peter Robinson <pbrobinson@gmail.com> - 0.6.7-3 |
---|
222 | - Updated to the new python sysarch spec file reqs |
---|
223 | |
---|
224 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.7-2 |
---|
225 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
226 | |
---|
227 | * Wed May 20 2009 Peter Robinson <pbrobinson@gmail.com> - 0.6.7-1 |
---|
228 | - New upstream release, some spec file cleanups. |
---|
229 | |
---|
230 | * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.6-21 |
---|
231 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
232 | |
---|
233 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.6.6-20 |
---|
234 | - Rebuild for Python 2.6 |
---|
235 | |
---|
236 | * Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 0.6.6-19 |
---|
237 | - Fix Patch0:/%%patch mismatch. |
---|
238 | |
---|
239 | * Wed Jul 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-18 |
---|
240 | - removed suid permission for speech-dispatcher binary. |
---|
241 | |
---|
242 | * Wed Jul 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-17 |
---|
243 | - changing permissions of speech-dispatcher to 6711 (setuid and setguid) |
---|
244 | - relocating configuration files in case of OLPC branch. |
---|
245 | - excluding init script in case of OLPC branch. |
---|
246 | |
---|
247 | * Wed Jul 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-16 |
---|
248 | - yet another release bump required :-/ |
---|
249 | |
---|
250 | * Wed Jul 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-15 |
---|
251 | - release bump |
---|
252 | |
---|
253 | * Mon Jul 13 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-14 |
---|
254 | - conditional build required for OLPC Branch - Building without nas and |
---|
255 | pulse-audio support. |
---|
256 | |
---|
257 | * Mon Jun 23 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-13 |
---|
258 | - changed permission of speech-dispatcherd to 0644 too. |
---|
259 | |
---|
260 | * Fri Jun 20 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-12 |
---|
261 | - added BuildRequires: texinfo (for makeinfo) |
---|
262 | - changed permissions of Sourcex to 0644 |
---|
263 | - incorporated modified init script by mtasaka |
---|
264 | - fixed a few more macros in changelog |
---|
265 | - modified location of Source1 and Patch0 to point to online locations |
---|
266 | |
---|
267 | * Wed Jun 18 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-11 |
---|
268 | - fixed encoding of speech-dispatcher-cs.info file to UTF-8 |
---|
269 | |
---|
270 | * Wed Jun 11 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-10 |
---|
271 | - removed Requires(preun) duplicates |
---|
272 | - applied -p option correctly to install command |
---|
273 | - fixed macros in changelog to prevent them from exapnding |
---|
274 | - fixed the init script |
---|
275 | - added patch to change log directory of speech-dispatcher and start only espeak |
---|
276 | |
---|
277 | * Sun Jun 08 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-9 |
---|
278 | - removed %%{_infodir}/dir file |
---|
279 | |
---|
280 | * Sat Jun 07 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-8 |
---|
281 | - converted speech-dispatcher-cs.info to UTF-8 encoding |
---|
282 | - removed multiple file listings of /usr/lib/python2.5/site-packages/speechd/_test.py |
---|
283 | and fixed its mode |
---|
284 | - added init script as a SOURCE instead as a patch |
---|
285 | - duplicate Requires have now been removed |
---|
286 | - Timestamping of files has now been added |
---|
287 | - Install script fixed |
---|
288 | - init script fixed |
---|
289 | |
---|
290 | * Tue Jun 03 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-7 |
---|
291 | - changed license of base package to GPLv2+ and GPL |
---|
292 | - changed license of all other packages to GPLv2+ |
---|
293 | - fixed install sequence using cleaner for loop and pushd and popd commands |
---|
294 | - added init script for speech-dispatcher daemon |
---|
295 | - added COPYING to doc in base package |
---|
296 | - removed comment after /sbin/ldconfig |
---|
297 | - resolved rpmlint errors for base package [except UTF-8 encoding error for (cs) documentation file] |
---|
298 | - renamed long_message to spd_long_message and run_test to spd_run_test |
---|
299 | - reset mode of _test.py to 0755 |
---|
300 | |
---|
301 | * Sun Apr 27 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-6 |
---|
302 | - changed BR to pulseaudio-lib-devel |
---|
303 | - removed dotconf BR |
---|
304 | - gave ownership of /%%{python_sitelib}/speechd-0.3-py2.5.egg-info to python package if package is built for Fedora 9 or above |
---|
305 | |
---|
306 | * Sun Apr 13 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-5 |
---|
307 | - Removed conitional building options |
---|
308 | - Added BuildRequires for dotconf-devel |
---|
309 | |
---|
310 | * Mon Feb 18 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-4 |
---|
311 | - Manually specyfying make install for each src directory to be installed |
---|
312 | - Installing python package seprately by by-passing make install |
---|
313 | |
---|
314 | * Sun Feb 17 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-3 |
---|
315 | - Added Requires(post), Requires(preun) for -doc package |
---|
316 | - Changed scriptlet from postun to preun for -doc package |
---|
317 | - Removed Epoch |
---|
318 | - Moved %%{_libdir}/lib*.so back to devel pacakge |
---|
319 | - Require dependecny on base pacakge is now set to %%{version}-%%{release} instead of %%{version} |
---|
320 | - removed --prefix=$RPM_BUILD_ROOT/%%{_prefix} against configure macro. |
---|
321 | -- -python subpackage does not build anymore. |
---|
322 | - removed python subpackag rules from SPEC file. |
---|
323 | |
---|
324 | * Sat Feb 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-2 |
---|
325 | - fixed directory ownerships |
---|
326 | |
---|
327 | * Sat Feb 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-1 |
---|
328 | - using newest version of speech-dispatcher |
---|
329 | - updated %%{_libdir}/libspeechd.so.2.0.4 to %%{_libdir}/libspeechd.so.2.0.5 |
---|
330 | - python packages are being generated correctly now |
---|
331 | - must force prefix=$RPM_BUILD_ROOT/%%{_prefix} to enable python packages to get installed correctly. |
---|
332 | - finding and deleting .*la files in $RPM_BUILD_ROOT to avoid unpackaged files error. |
---|
333 | |
---|
334 | * Sat Feb 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.5-4 |
---|
335 | - updated build root |
---|
336 | |
---|
337 | * Sat Feb 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.5-3 |
---|
338 | - added macro to prevent error from stopping build for not including *.la files |
---|
339 | - added epoch to the SPEC |
---|
340 | - conditional build seems to be working correctly the old way only?? |
---|
341 | - unified changelogs |
---|
342 | |
---|
343 | * Fri Feb 15 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.5-2 |
---|
344 | - Removed .la files |
---|
345 | - Removed doc-cs packages and merged it into doc package |
---|
346 | - Removed packaging of static files, and tested -without static_libs option for configure script |
---|
347 | - Moved symlink .so files from devel package to main package |
---|
348 | - Commented /sbin/ldconfig for devel package. |
---|