source: projects/specs/trunk/s/speech-dispatcher/speech-dispatcher-vl.spec @ 568

Revision 568, 13.3 KB checked in by inagaki, 14 years ago (diff)

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