Working Conditional Build

This commit is contained in:
Hemant Goyal 2008-07-16 04:03:07 +00:00
parent 5be9a56e94
commit 12166cc7de
2 changed files with 28 additions and 7 deletions

View File

@ -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

View File

@ -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