|
 |
2e4ad9a |
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
Name: sphinxbase
|
|
 |
2e4ad9a |
Version: 0.4.1
|
|
 |
2e4ad9a |
Release: 1%{?dist}
|
|
 |
2e4ad9a |
Summary: Common library for CMU Sphinx voice recognition products
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
Group: Development/Libraries
|
|
 |
2e4ad9a |
License: BSD
|
|
 |
2e4ad9a |
URL: http://www.cmusphinx.org/
|
|
 |
2e4ad9a |
Source0: http://downloads.sourceforge.net/cmusphinx/%{name}-%{version}.tar.bz2
|
|
 |
2e4ad9a |
# This patch has not been sent upstream, as it fixes a Fedora-specific problem.
|
|
 |
2e4ad9a |
# Install the Python egg in the Fedora way.
|
|
 |
2e4ad9a |
Patch0: sphinxbase-0.4.1-python.patch
|
|
 |
2e4ad9a |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
BuildRequires: alsa-lib-devel, blas-devel, doxygen, lapack-devel
|
|
 |
2e4ad9a |
BuildRequires: perl, python-setuptools-devel, tex(latex)
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%description
|
|
 |
2e4ad9a |
Sphinxbase is a common library for CMU Sphinx voice recognition products.
|
|
 |
2e4ad9a |
This package does not provide voice recognition by itself.
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%package devel
|
|
 |
2e4ad9a |
Summary: Header and other development files for sphinxbase
|
|
 |
2e4ad9a |
Group: Development/Libraries
|
|
 |
2e4ad9a |
Requires: %{name}-libs = %{version}-%{release}, pkgconfig
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%description devel
|
|
 |
2e4ad9a |
Header files and other development files for sphinxbase.
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%package libs
|
|
 |
2e4ad9a |
Summary: Libraries for sphinxbase
|
|
 |
2e4ad9a |
Group: Development/Libraries
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%description libs
|
|
 |
2e4ad9a |
The libraries for sphinxbase.
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%package python
|
|
 |
2e4ad9a |
Summary: Python interface to sphinxbase
|
|
 |
2e4ad9a |
Group: Development/Libraries
|
|
 |
2e4ad9a |
Requires: %{name}-libs = %{version}-%{release}
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%description python
|
|
 |
2e4ad9a |
Python interface to sphinxbase.
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%prep
|
|
 |
2e4ad9a |
%setup -q
|
|
 |
2e4ad9a |
%patch0 -p1
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
iconv -f ISO8859-1 -t UTF-8 AUTHORS > AUTHORS.new
|
|
 |
2e4ad9a |
mv -f AUTHORS.new AUTHORS
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%build
|
|
 |
2e4ad9a |
%configure --disable-dependency-tracking --disable-static
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
# Get rid of undesirable hardcoded runpaths
|
|
 |
2e4ad9a |
sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
|
|
 |
2e4ad9a |
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
# Get rid of undesirable direct library dependencies
|
|
 |
2e4ad9a |
sed -i -e 's/-lpthread -lm -lblas -llapack/-lm/g' src/libsphinxad/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/libsphinxbase/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/libsphinxbase/fe/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/libsphinxbase/feat/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/libsphinxbase/lm/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/libsphinxbase/util/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/sphinx_adtools/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/sphinx_cepview/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/sphinx_fe/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/sphinx_jsgf2fsg/Makefile
|
|
 |
2e4ad9a |
sed -i -e 's/-lasound //g' src/sphinx_lmtools/Makefile
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
# Build the programs and libraries
|
|
 |
2e4ad9a |
make %{?_smp_mflags}
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
# Build the man pages
|
|
 |
2e4ad9a |
cd doc
|
|
 |
2e4ad9a |
export LD_LIBRARY_PATH=../src/libsphinxbase/.libs:../src/libsphinxad/.libs
|
|
 |
2e4ad9a |
for prog in sphinx_cepview sphinx_fe; do
|
|
 |
2e4ad9a |
perl args2man.pl ../src/${prog}/${prog} < ${prog}.1.in > ${prog}.1
|
|
 |
2e4ad9a |
done
|
|
 |
2e4ad9a |
perl args2man.pl ../src/sphinx_adtools/sphinx_pitch < sphinx_pitch.1.in > sphinx_pitch.1
|
|
 |
2e4ad9a |
perl args2man.pl ../src/sphinx_lmtools/sphinx_lm_eval < sphinx_lm_eval.1.in > sphinx_lm_eval.1
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%install
|
|
 |
2e4ad9a |
rm -rf $RPM_BUILD_ROOT
|
|
 |
2e4ad9a |
mkdir -p $RPM_BUILD_ROOT%{python_sitearch}
|
|
 |
2e4ad9a |
make install DESTDIR=$RPM_BUILD_ROOT
|
|
 |
2e4ad9a |
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
# Install the man pages
|
|
 |
2e4ad9a |
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
|
 |
2e4ad9a |
cp -p doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%clean
|
|
 |
2e4ad9a |
rm -rf $RPM_BUILD_ROOT
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%post libs -p /sbin/ldconfig
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%postun libs -p /sbin/ldconfig
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%files
|
|
 |
2e4ad9a |
%defattr(-,root,root,-)
|
|
 |
2e4ad9a |
%doc AUTHORS ChangeLog COPYING NEWS README
|
|
 |
2e4ad9a |
%{_bindir}/*
|
|
 |
2e4ad9a |
%{_mandir}/man1/*
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%files devel
|
|
 |
2e4ad9a |
%defattr(-,root,root,-)
|
|
 |
2e4ad9a |
%doc doc/html
|
|
 |
2e4ad9a |
%{_includedir}/sphinxbase
|
|
 |
2e4ad9a |
%{_libdir}/libsphinxad.so
|
|
 |
2e4ad9a |
%{_libdir}/libsphinxbase.so
|
|
 |
2e4ad9a |
%{_libdir}/pkgconfig/sphinxbase.pc
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%files libs
|
|
 |
2e4ad9a |
%defattr(-,root,root,-)
|
|
 |
2e4ad9a |
%{_libdir}/libsphinxad.so.*
|
|
 |
2e4ad9a |
%{_libdir}/libsphinxbase.so.*
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%files python
|
|
 |
2e4ad9a |
%defattr(-,root,root,-)
|
|
 |
2e4ad9a |
%{python_sitearch}/*
|
|
 |
2e4ad9a |
|
|
 |
2e4ad9a |
%changelog
|
|
 |
2e4ad9a |
* Mon Jun 1 2009 Jerry James <loganjerry@gmail.com> - 0.4.1-1
|
|
 |
2e4ad9a |
- Initial RPM
|