speech-dispatcher-vl.spec 13 KB

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