From 2f5e3651ac50dbf9746729e9050734d6a53ea156 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Nov 12 2014 17:09:16 +0000 Subject: Link with atlas instead of the reference blas implementation. Also: - Add Provides: bundled(jquery) - Fix private libs listed as nonprivate in the pkgconfig file - Minor spec file cleanups --- diff --git a/sphinxbase.spec b/sphinxbase.spec index 84281c1..baa0275 100644 --- a/sphinxbase.spec +++ b/sphinxbase.spec @@ -1,6 +1,6 @@ Name: sphinxbase Version: 0.8 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Common library for CMU Sphinx voice recognition products Group: Development/Libraries @@ -19,19 +19,17 @@ BuildRequires: bison BuildRequires: Cython BuildRequires: doxygen BuildRequires: ghostscript -BuildRequires: lapack-devel -BuildRequires: libsamplerate-devel -BuildRequires: libsndfile-devel BuildRequires: libtool BuildRequires: perl BuildRequires: perl(Pod::Usage) -BuildRequires: pulseaudio-libs-devel +BuildRequires: pkgconfig(atlas) +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(samplerate) +BuildRequires: pkgconfig(sndfile) BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: tex(latex) -%global __provides_exclude_from ^%{_libdir}/python.*\\.so$ - %description Sphinxbase is a common library for CMU Sphinx voice recognition products. This package does not provide voice recognition by itself. @@ -40,7 +38,8 @@ 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: pulseaudio-libs-devel%{?_isa} +Requires: pkgconfig(libpulse) +Provides: bundled(jquery) %description devel Header files and other development files for sphinxbase. @@ -66,7 +65,10 @@ Python 2 interface to sphinxbase. %patch1 %patch2 -# Regenerate the configure files due to changes in patch 0 +# Use atlas instead of the blas reference implementation +sed -ri 's/blas|lapack/satlas/' configure.in + +# Regenerate the configure files due to changes in patch 0 and the atlas change autoreconf -fi # Fix encoding @@ -90,18 +92,27 @@ for f in src/sphinx_lmtools/sphinx_lm_sort src/sphinx_jsgf2fsg/fsg2dot.pl \ done %build +export CPPFLAGS="-I %{_includedir}/atlas" +export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}/atlas" %configure --disable-static --disable-rpath # 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|' \ + -e 's|CC="\(g.*\)"|CC="\1 -Wl,--as-needed"|' \ -i libtool # Build the programs and libraries make %{?_smp_mflags} +# Some private libs are marked as nonprivate in the pkgconfig file +extralibs=$(sed -n 's/^Libs:.*-lm \(.*\)/\1/p' sphinxbase.pc | sed 's/ / /g') +sed -e 's/^\(libs=".*-lm\).*/\1"/' \ + -e 's/^\(Libs:.*-lm\).*/\1/' \ + -e "s/^Libs\.private.*/& $extralibs/" \ + -i sphinxbase.pc + # Build the man pages cd doc export LD_LIBRARY_PATH=../src/libsphinxbase/.libs:../src/libsphinxad/.libs @@ -112,18 +123,18 @@ perl args2man.pl ../src/sphinx_adtools/sphinx_pitch < sphinx_pitch.1.in > sphinx %install # Install the binaries and libraries -mkdir -p $RPM_BUILD_ROOT%{python_sitearch} -make install DESTDIR=$RPM_BUILD_ROOT +mkdir -p %{buildroot}%{python_sitearch} +make install DESTDIR=%{buildroot} # Install the man pages -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 -cp -p doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 +mkdir -p %{buildroot}%{_mandir}/man1 +cp -p doc/*.1 %{buildroot}%{_mandir}/man1 # Remove libtool archives -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/*.la # Fix a permission problem -chmod 0755 $RPM_BUILD_ROOT%{python2_sitearch}/%{name}.so +chmod 0755 %{buildroot}%{python2_sitearch}/%{name}.so %post libs -p /sbin/ldconfig @@ -141,7 +152,8 @@ chmod 0755 $RPM_BUILD_ROOT%{python2_sitearch}/%{name}.so %{_libdir}/pkgconfig/sphinxbase.pc %files libs -%doc AUTHORS ChangeLog COPYING NEWS README +%doc AUTHORS ChangeLog NEWS README +%license COPYING %{_libdir}/libsphinxad.so.* %{_libdir}/libsphinxbase.so.* @@ -149,6 +161,12 @@ chmod 0755 $RPM_BUILD_ROOT%{python2_sitearch}/%{name}.so %{python2_sitearch}/* %changelog +* Wed Nov 12 2014 Jerry James - 0.8-9 +- Link with atlas instead of the reference blas implementation +- Add Provides: bundled(jquery) +- Fix private libs listed as nonprivate in the pkgconfig file +- Minor spec file cleanups + * Mon Aug 18 2014 Fedora Release Engineering - 0.8-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild