speech-dispatcher-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. %{!?python3_sitearch: %define python3_sitearch %(python3 -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.8.2
  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: espeak-devel
  19. BuildRequires: alsa-lib-devel
  20. BuildRequires: dotconf-devel
  21. BuildRequires: texinfo
  22. BuildRequires: libraw1394-devel
  23. BuildRequires: pulseaudio-libs-devel
  24. BuildRequires: libao-devel
  25. BuildRequires: glib2-devel
  26. BuildRequires: flite-devel
  27. BuildRequires: nas-devel
  28. BuildRequires: libtool-ltdl-devel
  29. BuildRequires: python3-devel
  30. Requires(post): /sbin/chkconfig
  31. Requires(preun): /sbin/chkconfig /sbin/service
  32. Requires(postun): /sbin/service
  33. Obsoletes: %{name}-python < 0.8.0
  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. Summary(ja): %{name} の開発用ファイル
  51. Group: Development/Libraries
  52. License: GPLv2+
  53. Requires: speech-dispatcher = %{version}-%{release}
  54. %description devel
  55. The %{name}-devel package contains libraries and header files for
  56. developing applications that use %{name}.
  57. %package doc
  58. Summary: Documentation for speech-dispatcher
  59. Summary(ja): speech-dispatcher のドキュメント
  60. License: GPLv2+
  61. Group: Applications/Documentation
  62. BuildArch: noarch
  63. Requires: speech-dispatcher = %{version}-%{release}
  64. Requires(post): /sbin/install-info
  65. Requires(preun):/sbin/install-info
  66. %description doc
  67. speechd documentation
  68. %package -n python3-%{name}
  69. Summary: Python Client API for speech-dispatcher
  70. Summary(ja): speech-dispacher の python3 モジュール
  71. License: GPLv2+
  72. Group: Development/Libraries
  73. Requires: speech-dispatcher = %{version}-%{release}
  74. Requires: python3
  75. %description -n python3-%{name}
  76. speechd python3 module
  77. %prep
  78. %setup -q
  79. %build
  80. # only for configure
  81. export LIBS="-lpulse -lpulse-simple"
  82. %configure \
  83. --disable-static \
  84. --with-alsa \
  85. --with-pulse \
  86. --with-flite \
  87. --sysconfdir=%{_sysconfdir} \
  88. --with-default-audio-method=pulse
  89. make %{?_smp_mflags}
  90. %install
  91. rm -rf $RPM_BUILD_ROOT
  92. for dir in \
  93. config/ doc/ include/ src/audio/ src/api/ src/modules/ src/tests/ src/server/ src/clients/
  94. do
  95. pushd $dir
  96. make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
  97. popd
  98. done
  99. #Install the init shell script
  100. mkdir -p $RPM_BUILD_ROOT%{_initrddir}
  101. install -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/
  102. #Remove %{_infodir}/dir file
  103. rm -f $RPM_BUILD_ROOT%{_infodir}/dir
  104. cd ../../
  105. find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
  106. # Move the config files from /usr/share to /etc
  107. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/clients
  108. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/modules
  109. mv $RPM_BUILD_ROOT%{_datadir}/speech-dispatcher/conf/speechd.conf $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/
  110. mv $RPM_BUILD_ROOT%{_datadir}/speech-dispatcher/conf/clients/* $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/clients
  111. mv $RPM_BUILD_ROOT%{_datadir}/speech-dispatcher/conf/modules/* $RPM_BUILD_ROOT%{_sysconfdir}/speech-dispatcher/modules
  112. # Remove dummy sound
  113. rm -rf $RPM_BUILD_ROOT/%{_datadir}/sounds/
  114. # Create log dir
  115. mkdir -p -m 0700 $RPM_BUILD_ROOT%{_localstatedir}/log/speech-dispatcher/
  116. # enable pulseaudio as default with a fallback to alsa
  117. sed 's/# AudioOutputMethod "pulse,alsa"/AudioOutputMethod "pulse,alsa"/' %{buildroot}%{_sysconfdir}/speech-dispatcher/speechd.conf
  118. %clean
  119. rm -rf $RPM_BUILD_ROOT
  120. %post
  121. /sbin/ldconfig
  122. /sbin/chkconfig --add speech-dispatcherd
  123. %postun
  124. /sbin/ldconfig
  125. if [ "$1" -ge "1" ] ; then
  126. /sbin/service speech-dispatcherd condrestart >/dev/null 2>&1 || :
  127. fi
  128. %preun
  129. if [ $1 = 0 ] ; then
  130. /sbin/service speech-dispatcherd stop >/dev/null 2>&1
  131. /sbin/chkconfig --del speech-dispatcherd
  132. fi
  133. %post doc
  134. /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
  135. /sbin/install-info %{_infodir}/spd-say.info %{_infodir}/dir || :
  136. /sbin/install-info %{_infodir}/ssip.info %{_infodir}/dir || :
  137. /sbin/install-info %{_infodir}/%{name}-cs.info %{_infodir}/dir || :
  138. %preun doc
  139. if [ $1 = 0 ]; then
  140. /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
  141. /sbin/install-info --delete %{_infodir}/spd-say.info %{_infodir}/dir || :
  142. /sbin/install-info --delete %{_infodir}/ssip.info %{_infodir}/dir || :
  143. /sbin/install-info --delete %{_infodir}/%{name}-cs.info %{_infodir}/dir || :
  144. fi
  145. %files
  146. %defattr(-,root,root,-)
  147. %doc AUTHORS ChangeLog NEWS README TODO COPYING
  148. %config(noreplace) %{_sysconfdir}/speech-dispatcher/speechd.conf
  149. %config(noreplace) %{_sysconfdir}/speech-dispatcher/clients/*.conf
  150. %config(noreplace) %{_sysconfdir}/speech-dispatcher/modules/*.conf
  151. %dir %{_sysconfdir}/speech-dispatcher/
  152. %dir %{_sysconfdir}/speech-dispatcher/clients
  153. %dir %{_sysconfdir}/speech-dispatcher/modules
  154. %{_bindir}/*
  155. %{_libdir}/speech-dispatcher-modules/sd_*
  156. %{_datadir}/%{name}/conf/desktop/speechd.desktop
  157. %dir %{_libdir}/speech-dispatcher-modules
  158. %{_libdir}/libspeechd.so.*
  159. %dir %{_libdir}/speech-dispatcher
  160. %{_libdir}/speech-dispatcher/spd*.so
  161. %dir %attr(0700, root, root) %{_localstatedir}/log/speech-dispatcher/
  162. %attr(0755,root,root)%{_initrddir}/speech-dispatcherd
  163. %files devel
  164. %defattr(-,root,root,-)
  165. %{_includedir}/*
  166. %{_libdir}/lib*.so
  167. %files doc
  168. %defattr(-,root,root,-)
  169. %{_infodir}/*
  170. %files -n python3-%{name}
  171. %defattr(-,root,root,-)
  172. %{python3_sitearch}/speechd*
  173. %changelog
  174. * Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.8.2-2
  175. - rebuild with python3-3.5.2
  176. * Wed Apr 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.8.2-1
  177. - new upstream release
  178. - add BuildRequires: python3-devel
  179. - create python3-speech-dispatcher subpackage
  180. * Tue Feb 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.8.1-2
  181. - rebuilt with flite 2.0
  182. - changed doc subpackage to noarch
  183. * Sun Dec 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.8.1-1
  184. - new upstream release
  185. - remove %%{name}-python subpackage
  186. - add BuildRequires: libtool-ltdl-devel
  187. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.7.1-2
  188. - rebuild with python-2.7.2
  189. * Sat Nov 05 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.7.1-1
  190. - new upstream release
  191. - remove all patches
  192. * Sun Mar 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.6.7-5
  193. - Initial build for Vine Linux
  194. * Wed Mar 3 2010 Peter Robinson <pbrobinson@gmail.com> - 0.6.7-4
  195. - Add patch to fix dso linking. Bug 564851
  196. * Sat Jan 9 2010 Peter Robinson <pbrobinson@gmail.com> - 0.6.7-3
  197. - Updated to the new python sysarch spec file reqs
  198. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.7-2
  199. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  200. * Wed May 20 2009 Peter Robinson <pbrobinson@gmail.com> - 0.6.7-1
  201. - New upstream release, some spec file cleanups.
  202. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.6-21
  203. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  204. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.6.6-20
  205. - Rebuild for Python 2.6
  206. * Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 0.6.6-19
  207. - Fix Patch0:/%%patch mismatch.
  208. * Wed Jul 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-18
  209. - removed suid permission for speech-dispatcher binary.
  210. * Wed Jul 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-17
  211. - changing permissions of speech-dispatcher to 6711 (setuid and setguid)
  212. - relocating configuration files in case of OLPC branch.
  213. - excluding init script in case of OLPC branch.
  214. * Wed Jul 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-16
  215. - yet another release bump required :-/
  216. * Wed Jul 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-15
  217. - release bump
  218. * Sun Jul 13 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-14
  219. - conditional build required for OLPC Branch - Building without nas and
  220. pulse-audio support.
  221. * Mon Jun 23 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-13
  222. - changed permission of speech-dispatcherd to 0644 too.
  223. * Fri Jun 20 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-12
  224. - added BuildRequires: texinfo (for makeinfo)
  225. - changed permissions of Sourcex to 0644
  226. - incorporated modified init script by mtasaka
  227. - fixed a few more macros in changelog
  228. - modified location of Source1 and Patch0 to point to online locations
  229. * Wed Jun 18 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-11
  230. - fixed encoding of speech-dispatcher-cs.info file to UTF-8
  231. * Wed Jun 11 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-10
  232. - removed Requires(preun) duplicates
  233. - applied -p option correctly to install command
  234. - fixed macros in changelog to prevent them from exapnding
  235. - fixed the init script
  236. - added patch to change log directory of speech-dispatcher and start only espeak
  237. * Sun Jun 08 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-9
  238. - removed %%{_infodir}/dir file
  239. * Sat Jun 07 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-8
  240. - converted speech-dispatcher-cs.info to UTF-8 encoding
  241. - removed multiple file listings of /usr/lib/python2.5/site-packages/speechd/_test.py
  242. and fixed its mode
  243. - added init script as a SOURCE instead as a patch
  244. - duplicate Requires have now been removed
  245. - Timestamping of files has now been added
  246. - Install script fixed
  247. - init script fixed
  248. * Tue Jun 03 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-7
  249. - changed license of base package to GPLv2+ and GPL
  250. - changed license of all other packages to GPLv2+
  251. - fixed install sequence using cleaner for loop and pushd and popd commands
  252. - added init script for speech-dispatcher daemon
  253. - added COPYING to doc in base package
  254. - removed comment after /sbin/ldconfig
  255. - resolved rpmlint errors for base package [except UTF-8 encoding error for (cs) documentation file]
  256. - renamed long_message to spd_long_message and run_test to spd_run_test
  257. - reset mode of _test.py to 0755
  258. * Sun Apr 27 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-6
  259. - changed BR to pulseaudio-lib-devel
  260. - removed dotconf BR
  261. - gave ownership of /%%{python_sitelib}/speechd-0.3-py2.5.egg-info to python package if package is built for Fedora 9 or above
  262. * Sun Apr 13 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-5
  263. - Removed conitional building options
  264. - Added BuildRequires for dotconf-devel
  265. * Mon Feb 18 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-4
  266. - Manually specyfying make install for each src directory to be installed
  267. - Installing python package seprately by by-passing make install
  268. * Sun Feb 17 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-3
  269. - Added Requires(post), Requires(preun) for -doc package
  270. - Changed scriptlet from postun to preun for -doc package
  271. - Removed Epoch
  272. - Moved %%{_libdir}/lib*.so back to devel pacakge
  273. - Require dependecny on base pacakge is now set to %%{version}-%%{release} instead of %%{version}
  274. - removed --prefix=$RPM_BUILD_ROOT/%%{_prefix} against configure macro.
  275. -- -python subpackage does not build anymore.
  276. - removed python subpackag rules from SPEC file.
  277. * Sat Feb 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-2
  278. - fixed directory ownerships
  279. * Sat Feb 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.6-1
  280. - using newest version of speech-dispatcher
  281. - updated %%{_libdir}/libspeechd.so.2.0.4 to %%{_libdir}/libspeechd.so.2.0.5
  282. - python packages are being generated correctly now
  283. - must force prefix=$RPM_BUILD_ROOT/%%{_prefix} to enable python packages to get installed correctly.
  284. - finding and deleting .*la files in $RPM_BUILD_ROOT to avoid unpackaged files error.
  285. * Sat Feb 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.5-4
  286. - updated build root
  287. * Sat Feb 16 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.5-3
  288. - added macro to prevent error from stopping build for not including *.la files
  289. - added epoch to the SPEC
  290. - conditional build seems to be working correctly the old way only??
  291. - unified changelogs
  292. * Fri Feb 15 2008 Hemant Goyal <goyal.hemant@gmail.com> 0.6.5-2
  293. - Removed .la files
  294. - Removed doc-cs packages and merged it into doc package
  295. - Removed packaging of static files, and tested -without static_libs option for configure script
  296. - Moved symlink .so files from devel package to main package
  297. - Commented /sbin/ldconfig for devel package.