diff --git a/.gitignore b/.gitignore index 2e8c5e2..3b698d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -sphinxbase-0.7.tar.gz +/sphinxbase-0.8.tar.gz diff --git a/sources b/sources index cb7aff1..0df017d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c1e96fc9232d78e733375c928e23860b sphinxbase-0.7.tar.gz +7335d233f7ad4ecc4b508aec7b5dc101 sphinxbase-0.8.tar.gz diff --git a/sphinxbase.spec b/sphinxbase.spec index 02e6486..851da9c 100644 --- a/sphinxbase.spec +++ b/sphinxbase.spec @@ -1,29 +1,22 @@ Name: sphinxbase -Version: 0.7 -Release: 5%{?dist} +Version: 0.8 +Release: 1%{?dist} Summary: Common library for CMU Sphinx voice recognition products Group: Development/Libraries License: BSD URL: http://cmusphinx.sourceforge.net/ Source0: http://downloads.sourceforge.net/cmusphinx/%{name}-%{version}.tar.gz -# This patch has not been sent upstream, as it fixes a Fedora-specific problem. -# Install the Python egg in the Fedora way. -Patch0: sphinxbase-python.patch -# This patch is a temporary workaround to the "file" type being removed from -# Cython. This is only a workaround as Python 3 doesn't expose a file type at -# the C API level (which is why Cython removed it). -Patch1: sphinxbase-python-file.patch - -BuildRequires: alsa-lib-devel + BuildRequires: bison -BuildRequires: blas-devel BuildRequires: Cython BuildRequires: doxygen +BuildRequires: ghostscript BuildRequires: lapack-devel +BuildRequires: libsamplerate-devel BuildRequires: libsndfile-devel BuildRequires: perl -BuildRequires: pkgconfig +BuildRequires: pulseaudio-libs-devel BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: tex(latex) @@ -38,7 +31,7 @@ This package does not provide voice recognition by itself. Summary: Header and other development files for sphinxbase Group: Development/Libraries Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Requires: alsa-lib-devel%{?_isa}, pkgconfig +Requires: pulseaudio-libs-devel%{?_isa} %description devel Header files and other development files for sphinxbase. @@ -51,46 +44,46 @@ Group: Development/Libraries The libraries for sphinxbase. %package python -Summary: Python interface to sphinxbase +Summary: Python 2 interface to sphinxbase Group: Development/Libraries Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description python -Python interface to sphinxbase. +Python 2 interface to sphinxbase. %prep %setup -q -%patch0 -%patch1 +# Fix encoding iconv -f ISO8859-1 -t UTF-8 -o AUTHORS.new AUTHORS touch -r AUTHORS.new AUTHORS mv -f AUTHORS.new AUTHORS -# Force code generation with a newer version of Cython -rm -f python/sphinxbase.c +# Force code generation with newer versions of Cython and bison +rm -f python/sphinxbase.c src/libsphinxbase/lm/jsgf_parser.{c,h} + +# Install the python egg in the Fedora way +sed 's|\( install \)--prefix\( \$(DESTDIR)\)\$(prefix)|\1--skip-build --root\2|' \ + -i python/Makefile.in + +# Improve auto requires detection +for f in src/sphinx_lmtools/sphinx_lm_sort src/sphinx_jsgf2fsg/fsg2dot.pl \ + python/hufftest2.py python/sb_test.py; do + sed -r 's|/usr/bin/env (.*)|/usr/bin/\1|' $f > $f.new + touch -r $f $f.new + mv -f $f.new $f +done %build %configure --disable-static --disable-rpath -# Get rid of undesirable hardcoded runpaths +# Get rid of undesirable hardcoded rpaths; workaround libtool reordering +# -Wl,--as-needed after all the libraries. 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' \ + -e 's|CC="gcc|CC="gcc -Wl,--as-needed|' \ -i libtool -# Get rid of undesirable direct library dependencies -sed -i 's/-lpthread -lm -lblas -llapack/-lm/' src/libsphinxad/Makefile -sed -i 's/-lasound //' src/libsphinxbase/Makefile -sed -i 's/-lasound //' src/libsphinxbase/fe/Makefile -sed -i 's/-lasound //' src/libsphinxbase/feat/Makefile -sed -i 's/-lasound //' src/libsphinxbase/lm/Makefile -sed -i 's/-lasound //' src/libsphinxbase/util/Makefile -sed -i 's/-lasound //' src/sphinx_adtools/Makefile -sed -i 's/-lasound //' src/sphinx_cepview/Makefile -sed -i 's/-lasound //' src/sphinx_fe/Makefile -sed -i 's/-lasound //' src/sphinx_jsgf2fsg/Makefile -sed -i 's/-lasound //' src/sphinx_lmtools/Makefile - # Build the programs and libraries make %{?_smp_mflags} @@ -111,13 +104,11 @@ make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 cp -p doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 -# Fix libtool damage +# Remove libtool archives rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -cd src/libsphinxad/.libs -gcc ${RPM_OPT_FLAGS} -std=gnu99 -shared cont_ad_base.o ad_alsa.o \ - -L$RPM_BUILD_ROOT%{_libdir} -lsphinxbase -lasound -lm \ - -Wl,-soname -Wl,libsphinxad.so.0 \ - -o $RPM_BUILD_ROOT%{_libdir}/libsphinxad.so.0.0.1 + +# Fix a permission problem +chmod 0755 $RPM_BUILD_ROOT%{python2_sitearch}/%{name}.so %post libs -p /sbin/ldconfig @@ -129,7 +120,7 @@ gcc ${RPM_OPT_FLAGS} -std=gnu99 -shared cont_ad_base.o ad_alsa.o \ %files devel %doc doc/html -%{_includedir}/sphinxbase +%{_includedir}/sphinxbase/ %{_libdir}/libsphinxad.so %{_libdir}/libsphinxbase.so %{_libdir}/pkgconfig/sphinxbase.pc @@ -140,9 +131,13 @@ gcc ${RPM_OPT_FLAGS} -std=gnu99 -shared cont_ad_base.o ad_alsa.o \ %{_libdir}/libsphinxbase.so.* %files python -%{python_sitearch}/* +%{python2_sitearch}/* %changelog +* Mon Dec 17 2012 Jerry James - 0.8-1 +- New upstream release +- Drop patches; no longer necessary + * Sat Jul 21 2012 Fedora Release Engineering - 0.7-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild