[espeak] Drop portaudio for RHEL

Jaroslav Škarvada jskarvad at fedoraproject.org
Fri Jan 27 20:23:39 UTC 2012


commit 2a6f30865e705643e9a08b98114096e56f373ecd
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date:   Fri Jan 27 21:23:37 2012 +0100

    Drop portaudio for RHEL

 espeak.spec |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/espeak.spec b/espeak.spec
index e3eb4aa..75483f6 100644
--- a/espeak.spec
+++ b/espeak.spec
@@ -1,6 +1,12 @@
+%if 0%{?rhel}
+%global backend pulseaudio
+%else
+%global backend runtime
+%endif
+
 Name:           espeak
 Version:        1.46.02
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Software speech synthesizer (text-to-speech)
 
 Group:          Applications/Multimedia
@@ -11,7 +17,10 @@ Source1:        espeak.1
 Patch0:         espeak-1.23-makefile_nostaticlibs.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires:  portaudio-devel pulseaudio-libs-devel gcc-c++
+%if ! 0%{?rhel}
+BuildRequires:  portaudio-devel
+%endif
+BuildRequires:  pulseaudio-libs-devel gcc-c++
 
 
 %description
@@ -57,7 +66,7 @@ rm -f espeak-data/*_dict
 %build
 # Compile espeak
 cd src
-make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" AUDIO=runtime
+make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" AUDIO=%{backend}
 
 # Compile the TTS voice dictionaries
 export ESPEAK_DATA_PATH=$RPM_BUILD_DIR/espeak-%{version}-source
@@ -70,7 +79,7 @@ done
 %install
 rm -rf $RPM_BUILD_ROOT
 cd $RPM_BUILD_DIR/espeak-%{version}-source/src
-make install DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} INCDIR=%{_includedir}/espeak LIBDIR=%{_libdir}
+make install DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} INCDIR=%{_includedir}/espeak LIBDIR=%{_libdir} AUDIO=%{backend}
 # Install manpage
 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
 cp -pf %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/
@@ -101,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Jan 27 2012 Jaroslav Škarvada <jskarvad at redhat.com> - 1.46.02-2
+- Drop portaudio for RHEL
+
 * Fri Jan 13 2012 Jaroslav Škarvada <jskarvad at redhat.com> - 1.46.02-1
 - New version
   Resolves: rhbz#781355


More information about the scm-commits mailing list