From 12166cc7defbfc17622a6465ec4da134433c9c33 Mon Sep 17 00:00:00 2001 From: Hemant Goyal Date: Jul 16 2008 04:03:07 +0000 Subject: Working Conditional Build --- diff --git a/import.log b/import.log index f9d7058..35eaad2 100644 --- a/import.log +++ b/import.log @@ -1,2 +1,3 @@ speech-dispatcher-0_6_6-13_fc7:HEAD:speech-dispatcher-0.6.6-13.fc7.src.rpm:1214288030 speech-dispatcher-0_6_6-14_fc7:HEAD:speech-dispatcher-0.6.6-14.fc7.src.rpm:1215968885 +speech-dispatcher-0_6_6-14_fc7:HEAD:speech-dispatcher-0.6.6-14.fc7.src.rpm:1216180922 diff --git a/speech-dispatcher.spec b/speech-dispatcher.spec index 569474b..4f057ef 100644 --- a/speech-dispatcher.spec +++ b/speech-dispatcher.spec @@ -1,5 +1,13 @@ %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") +%if 0%{?olpc} + %define with_nas 0 + %define with_pulse 0 +%else + %define with_nas 1 + %define with_pulse 1 +%endif + Name: speech-dispatcher Version: 0.6.6 Release: 14%{?dist} @@ -25,9 +33,14 @@ BuildRequires: python-setuptools BuildRequires: flite-devel BuildRequires: espeak-devel -%if 1%{?olpc} >= 2 +%if %{with_nas} Buildrequires: nas-devel +%endif + +%if %{with_pulse} Buildrequires: pulseaudio-lib-devel +%else +Buildrequires: glib2-devel %endif BuildRequires: alsa-lib-devel @@ -83,21 +96,28 @@ Requires: speech-dispatcher = %{version}-%{release} speechd python module %prep + +cat << EOF +Build options: +nas support : %{with_nas} +pulse support : %{with_pulse} + +Dist Status: +olpc : %{?olpc} +fedora : %{?fedora} +EOF + + %setup -q %patch -p1 + %build iconv -f ISO-8859-2 -t UTF-8 doc/speech-dispatcher-cs.texi -o doc/speech-dispatcher-cs_c.texi mv doc/speech-dispatcher-cs_c.texi doc/speech-dispatcher-cs.texi -%if 1%{?olpc} >= 2 -%configure --disable-static --without-nas --without-pulse -make %{?_smp_mflags} -%else %configure --disable-static make %{?_smp_mflags} -%endif - %install rm -rf $RPM_BUILD_ROOT