Name: cmusphinx3 Version: 0.8 Release: 13%{?dist} Summary: Large vocabulary speech recognition in C Group: Applications/Multimedia License: BSD URL: http://www.cmusphinx.org/ Source0: http://downloads.sourceforge.net/cmusphinx/sphinx3-%{version}.zip # This patch was sent upstream on 2009 Aug 26, and has been applied. It fixes # several cases of missing prototypes for functions declared in string.h # (strcpy, memset, etc.) Patch0: sphinx3-string.patch # This patch was sent upstream on 2009 Aug 26, and has been applied. It fixes # a number of broken links and unescaped special characters in the doxygen # source. Patch1: sphinx3-doxygen.patch # This patch has not been sent upstream, because it is specific to a Fedora # build environment. It fixes a Python include path. Patch2: sphinx3-python.patch # This patch has not been sent upstream, because it is specific to the way we # build shared libraries in Fedora. It adds a link necessary to avoid # undefined weak symbols in one library. Patch3: sphinx3-link.patch # This patch was sent upstream on 2012 Feb 17, and has been applied. It fixes # two problems identified by cpychecker. Patch4: sphinx3-cpychecker.patch # This patch has not been sent upstream yet. It fixes one lack of agreement # between a printf format specifier and the corresponding argument type. Patch5: sphinx3-format.patch BuildRequires: alsa-lib-devel BuildRequires: doxygen BuildRequires: libbsd-devel BuildRequires: pkgconfig BuildRequires: python2-devel BuildRequires: sphinxbase-devel Requires: %{name}-libs%{?_isa} = %{version}-%{release} %global __provides_exclude_from ^%{_libdir}/python.*\\.so$ %description Sphinx-3 is CMU's state-of-the-art large vocabulary speech recognition system. It uses Hidden Markov Models (HMM) with continuous output probability density functions (PDF). It supports several modes of operation. The more accurate mode, known as the "flat decoder", is descended from the original Sphinx-3 release. The faster mode, known as the "tree decoder", was developed separately. The two decoders were merged in Sphinx 3.5, though the flat decoder was not fully functional until Sphinx 3.7. %package devel Summary: Header files for developing with cmusphinx3 Group: Applications/Multimedia Requires: %{name}-libs%{?_isa} = %{version}-%{release}, pkgconfig Requires: sphinxbase-devel%{?_isa} %description devel Header files for developing with cmusphinx3. %package libs Summary: Shared libraries for cmusphinx3 executables Group: Applications/Multimedia %description libs Shared libraries for cmusphinx3 executables. %package python Summary: Python interface to cmusphinx3 Group: Applications/Multimedia Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: sphinxbase-python%{?_isa} %description python Python interface to cmusphinx3. %package doc Summary: Doxygen documentation for cmusphinx3 Group: Documentation Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description doc Doxygen documentation for cmusphinx3. %prep %setup -q -n sphinx3-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 %patch5 # Adapt to sphinxbase 0.7+ sed -i 's/heap_t /heap_t */' src/libs3decoder/libsearch/vithist.c # Remove executable bits from the documentation find doc -type f | xargs chmod a-x # Dispose of version control files in the documentation rm -fr doc/images/.svn doc/s3/.svn doc/s3-2_files/.svn # Let the sources find libutil.h for f in src/libs3decoder/libcfg/s3_cfg_convert.c src/libs3decoder/libsearch/fsg_history.c; do sed -e "s|libutil\.h|bsd/&|" $f > $f.new touch -r $f $f.new mv -f $f.new $f done # Convert the encoding of one file cd doc/s3-2_files iconv -f WINDOWS-1252 -t UTF-8 master03_stylesheet.css > x.css touch -r master03_stylesheet.css x.css mv -f x.css master03_stylesheet.css %build %configure --disable-static # Get rid of undesirable hardcoded runpaths sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ -i libtool # Build the C code and its documentation make %{?_smp_mflags} make doxygen # Build the Python interface cd python python setup.py build %install # Install the libraries, programs, and scripts make install DESTDIR=$RPM_BUILD_ROOT # Install the Python egg mkdir -p $RPM_BUILD_ROOT%{python_sitearch} cd python python setup.py install --skip-build --root $RPM_BUILD_ROOT # Get rid of files we don't want packaged rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -fr $RPM_BUILD_ROOT%{_datadir}/sphinx3/doc rm -f doc/images/Makefile doc/s3/*.fig %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %{_bindir}/* %{_datadir}/sphinx3 %files devel %{_includedir}/sphinx3 %{_libdir}/libs3decoder.so %{_libdir}/pkgconfig/sphinx3.pc %files libs %doc AUTHORS ChangeLog COPYING NEWS README %{_libdir}/libs3decoder.so.* %files python %{python_sitearch}/Sphinx3*.egg-info %{python_sitearch}/_sphinx3.so %files doc %doc doc/images doc/s3 doc/s3-2_files doc/*.doc doc/*.htm* doc/*.pdf doc/*.ppt %doc doc/*.txt doc/sphinx3.4.code.tracing doc/sphinx3.5_refactoring.note html %changelog * Mon Dec 17 2012 Jerry James <loganjerry@gmail.com> - 0.8-13 - Rebuild for sphinxbase 0.8 * Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Feb 17 2012 Jerry James <loganjerry@gmail.com> - 0.8-11 - Add cpychecker patch for bz 791280 - Add 2 missing %%{?_isa} tags * Tue Jan 10 2012 Jerry James <loganjerry@gmail.com> - 0.8-10 - Rebuild for bz 772699 - Fix source0 URL * Fri Jan 6 2012 Jerry James <loganjerry@gmail.com> - 0.8-9 - Rebuild for GCC 4.7 - Minor spec file cleanups * Fri Jul 15 2011 Jerry James <loganjerry@gmail.com> - 0.8-8 - Use RPM 4.9's new filter scheme to remove bogus provides - Minor spec file cleanups * Tue Apr 19 2011 Jerry James <loganjerry@gmail.com> - 0.8-7 - Rebuild for sphinxbase 0.7 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Nov 29 2010 Jerry James <loganjerry@gmail.com> - 0.8-5 - Move COPYING and other doc files to -libs package. * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.8-4 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Fri Sep 18 2009 Jerry James <loganjerry@gmail.com> - 0.8-3 - Drop unnecessary BRs - Preserve timestamp on iconv'd file * Tue Sep 15 2009 Jerry James <loganjerry@gmail.com> - 0.8-2 - Fix issues raised in review * Wed Aug 26 2009 Jerry James <loganjerry@gmail.com> - 0.8-1 - Initial RPM