source: projects/specs/branches/6/s/speech-dispatcher/speech-dispatcher-vl.spec @ 6249

Revision 6249, 13.5 KB checked in by inagaki, 12 years ago (diff)

update: speech-dispatcher

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