speech-dispatcher-vl.spec 13 KB

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