%define major 1 %define libname %mklibname %name %major %define libnamedevel %mklibname %name -d %global shared 1 %if !%shared %define libnamedevel %mklibname -d -s %name %endif # some programs may depend on data in */lib only %define speechtoolsdir %{_prefix}/lib/%{name} Summary: A free speech synthesizer Name: speech_tools Version: 1.2.96 Release: %mkrel 7 License: BSD Group: Sound URL: http://www.cstr.ed.ac.uk/projects/festival/ Source0: speech_tools-%{version}-beta.tar.bz2 Patch1: speech_tools-1.2.96-gcc41-amd64-int-pointer.patch Patch2: speech_tools-1.2.96-remove-invalid-gcc-option.patch # (fc) 1.2.96-4mdv cxx is not gcc (Fedora) Patch3: speech_tools-1.2.96-ohjeezcxxisnotgcc.patch # (fc) 1.2.96-4mdv build esound module (Fedora) Patch4: speech_tools-1.2.96-buildesdmodule.patch # (fc) 1.2.96-4mdv Fix a coding error (RH bug #162137) (Fedora) Patch5: speech_tools-1.2.96-rateconvtrivialbug.patch # (fc) 1.2.96-4mdv Link libs with libm, libtermcap, and libesd (RH bug #198190) (Fedora) Patch6: speech_tools-1.2.96-linklibswithotherlibs.patch # (fc) 1.2.96-5mdv improve soname (Fedora) Patch7: speech_tools-1.2.96-bettersoname.patch Patch8: speech-tools-1.2.96_beta-gcc43-include.patch BuildRequires: ncurses-devel esound-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description Festival is a general multi-lingual speech synthesis system developed at CSTR. It offers a full text to speech system with various APIs, as well as an environment for development and research of speech synthesis techniques. It is written in C++ with a Scheme-based command interpreter for general control. %if %shared %package -n %{libname} Summary: Static libraries and headers for festival text to speech Group: System/Libraries Requires: %{name} = %{version}-%{release} %description -n %{libname} Festival is a general multi-lingual speech synthesis system developed at CSTR. It offers a full text to speech system with various APIs, as well as an environment for development and research of speech synthesis techniques. It is written in C++ with a Scheme-based command interpreter for general control. This package contains the libraries and includes files necessary for applications that use festival. %endif %package -n %{libnamedevel} Summary: Static libraries and headers for festival text to speech Group: Development/C++ Requires: %{name} = %{version}-%{release} Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %if %shared Obsoletes: %mklibname -d %name %major Obsoletes: %mklibname -d -s %name %else Obsoletes: %mklibname -d -s %name %major %endif %description -n %{libnamedevel} Festival is a general multi-lingual speech synthesis system developed at CSTR. It offers a full text to speech system with various APIs, as well as an environment for development and research of speech synthesis techniques. It is written in C++ with a Scheme-based command interpreter for general control. This package contains the libraries and includes files necessary to develop applications using festival. %prep %setup -q -n %{name} %patch1 -p1 -b .gcc41-amd64-int-pointer %patch2 -p0 -b .remove-invalid-gcc-option %patch3 -p1 -b .cxxisnotgcc %patch4 -p1 -b .buildesdmodule %patch5 -p1 -b .rateconvtrivialbug %patch6 -p1 -b .linklibswithotherlibs %patch7 -p1 -b .bettersoname %patch8 -p1 -b .gcc43 %build %if shared export SHARED=2 %endif %configure2_5x # -fPIC 'cause we're building shared libraries and it doesn't hurt # -fno-strict-aliasing because of a couple of warnings about code # problems; if $RPM_OPT_FLAGS contains -O2 or above, this puts # it back. Once that problem is gone upstream, remove this for # better optimization. make \ CFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing" \ CXXFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing" %check # all tests must pass make test %install rm -rf %{buildroot} install -d %{buildroot}/{%{_bindir},%{_libdir},%{_includedir}/EST,%{_datadir}/%{name}/example_data,%{speechtoolsdir}/{scripts,siod,stats/wagon,grammar/{scfg,wfst}}} rm -f %{buildroot}%{_bindir}/Makefile # includes cp -a include/* %{buildroot}%{_includedir}/EST find %{buildroot}%{_includedir}/EST -name Makefile -exec rm \{\} \; for file in `find %{buildroot}%{_includedir}/EST -type f` do sed 's/\"\(.*h\)\"/\<EST\/\1\>/g' $file > $file.tmp mv $file.tmp $file done sed 's/\<EST\//&rxp\//g' %{buildroot}%{_includedir}/EST/rxp/rxp.h > bzzz mv bzzz %{buildroot}%{_includedir}/EST/rxp/rxp.h for i in %{buildroot}%{_includedir}/EST/rxp/* do ln -s %{_includedir}/EST/rxp/`basename $i` %{buildroot}%{_includedir}/EST/`basename $i` done ln -s %{_includedir}/EST %{buildroot}%{speechtoolsdir}/include # libraries install lib/lib* %{buildroot}%{_libdir} %if %shared for i in %{buildroot}%{_libdir}/*.so do rm $i ln -s `basename $i*` $i done %endif # binaries install `find bin -type f -perm +1` %{buildroot}%{_bindir} # scripts install scripts/{example_to_doc++.prl,make_wagon_desc.sh,resynth.sh,shared_script,shared_setup_prl,shared_setup_sh} \ %{buildroot}%{speechtoolsdir}/scripts # example data install lib/example_data/* %{buildroot}%{_datadir}/%{name}/example_data rm %{buildroot}%{_datadir}/%{name}/example_data/Makefile cp -a config %{buildroot}%{speechtoolsdir} cp -r testsuite %{buildroot}%{speechtoolsdir} rm %{buildroot}%{speechtoolsdir}/testsuite/*.o install siod/siod.mak %{buildroot}%{speechtoolsdir}/siod install lib/siod/*.scm %{buildroot}%{speechtoolsdir}/siod install stats/ols.mak %{buildroot}%{speechtoolsdir}/stats install stats/wagon/wagon.mak %{buildroot}%{speechtoolsdir}/stats/wagon install grammar/scfg/scfg.mak %{buildroot}%{speechtoolsdir}/grammar/scfg install grammar/wfst/wfst.mak %{buildroot}%{speechtoolsdir}/grammar/wfst # symlinks into buildtree evil for i in %{buildroot}%{_bindir}/*; do if [ -h "$i" ]; then a=`readlink "$i"` rm -f "$i" cp -a "$a" %{buildroot}%{_bindir}/ fi done # Remove some files we don't need rm -rf %{buildroot}%{_includedir}/speech_tools/win32 rm -f %{buildroot}%{_datadir}/festival/etc/unknown_RedHatLinux/ find %{buildroot} -type f -size 0 -exec rm -f {} \; %if %shared %if %mdkversion < 200900 %post -n %{libname} -p /sbin/ldconfig %endif %postun -n %{libname} %if %mdkversion < 200900 /sbin/ldconfig %endif %endif %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc INSTALL README %{_bindir}/* %{_datadir}/%{name} %if %shared %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.%{major}* %endif %files -n %{libnamedevel} %defattr(-,root,root) %{_includedir}/EST %dir %{speechtoolsdir} %{speechtoolsdir}/* %if %shared %{_libdir}/*.so %endif %{_libdir}/*.a #%files -n %{libname}-static-devel #%defattr(-,root,root) #%_libdir/*.a %changelog * Mon Jul 14 2008 Oden Eriksson <oeriksson@mandriva.com> 1.2.96-7mdv2009.0 + Revision: 234938 - correction: it's P8 from gentoo - fix build (P7 from gentoo) + Thierry Vignaud <tvignaud@mandriva.com> - rebuild + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers - normalize call to ldconfig in %%post/%%postun * Thu Mar 06 2008 Frederic Crozat <fcrozat@mandriva.com> 1.2.96-5mdv2008.1 + Revision: 180899 - Patch7 (Fedora): improve soname * Fri Feb 22 2008 Frederic Crozat <fcrozat@mandriva.com> 1.2.96-4mdv2008.1 + Revision: 173981 - Fix missing requires in devel package - Compile all libraries as shared (Fedora) - Switch from termcap to ncurses - Patch3 (Fedora): use g++ and not gcc when needed - Patch4 (Fedora): build esound module - Patch5 (Fedora): fix coding error (RH bug #162137) - Patch6 (Fedora): fix unresolved symbols in libraries (RH bug #198190) - Ensure our CFLAGS are used + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Mon Aug 13 2007 Funda Wang <fundawang@mandriva.org> 1.2.96-3mdv2008.0 + Revision: 62479 - Remove invalid gcc option in Makefile - use --build - Shared build !! * Tue Jul 10 2007 Funda Wang <fundawang@mandriva.org> 1.2.96-2mdv2008.0 + Revision: 50798 - Obsoletes old devel policy package * Sun Jul 08 2007 Funda Wang <fundawang@mandriva.org> 1.2.96-1mdv2008.0 + Revision: 49829 - Add gentoo patch to have it build on x86_64 - clean old patches - New version * Tue Dec 12 2006 Frederic Crozat <fcrozat@mandriva.com> 1.2.95-2mdv2007.0 + Revision: 95735 - uncompress patches Patch 4: fix build with gcc 4.1.2 (Mdv bug #27640) - Import speech_tools * Tue Dec 20 2005 Arnaud de Lorbeau <devel@mandriva.com> 1.2.95-1mdk - 1.2.95 - remove P4, adapt P3 * Wed Sep 21 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.2.3-5mdk - selected fixes from 1.3-branch to fix segfault in festival, this also folds in some of the previous C++ fixes * Thu Aug 25 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.2.3-4mdk - make check in build - 64-bit + even more C++ fixes * Thu Oct 14 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.2.3-3mdk - nuke redundant requires - misc spec file fixes * Tue Jul 20 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.2.3-2mdk - C++ fixes