From 9fd39f3a017408aa78cd6cd54e4180594bec0c67 Mon Sep 17 00:00:00 2001 From: Kedar Sovani Date: Sun, 7 Dec 2008 19:01:17 -0500 Subject: [PATCH] Disable java builds based on configuration options. Signed-off-by: Kedar Sovani --- gettext.spec | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index 831fb6b..d6cbfe4 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,10 +1,21 @@ # libintl.jar requires gcj >= 4.3 to build +%define buildjava 0 %define buildjar 1 +%ifarch %{arm} +%define buildjava 0 +%endif + +%if %{buildjava} +%define extraconfigopt --enable-java +%else +%define buildjar 0 +%endif + Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.17 -Release: 8%{?dist} +Release: 8%{?dist}.fa1 License: GPLv3 and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -16,9 +27,12 @@ Requires(preun): /sbin/install-info BuildRequires: automake >= 1.8 %endif BuildRequires: autoconf >= 2.5 -BuildRequires: libtool, bison, gcc-c++, gcc-java, libgcj +BuildRequires: libtool, bison, gcc-c++, +%if %{buildjava} +BuildRequires: gcc-java, libgcj # For javadoc BuildRequires: java-1.6.0-openjdk-devel +%endif # need expat for xgettext on glade Buildrequires: expat-devel %if %{buildjar} @@ -86,7 +100,7 @@ export JAVAC=gcj export JAR=fastjar %endif %configure --without-included-gettext --enable-nls --disable-static \ - --enable-shared --with-pic-=yes --disable-csharp --enable-java \ + --enable-shared --with-pic-=yes --disable-csharp %{?extraconfigopt} \ --disable-rpatha make %{?_smp_mflags} GCJFLAGS="-findirect-dispatch" @@ -140,7 +154,9 @@ rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/libintl.jar %endif +%if %{buildjava} rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar +%endif # remove unpackaged files from the buildroot rm -rf ${RPM_BUILD_ROOT}%{_datadir}/emacs @@ -244,7 +260,9 @@ fi %{_libdir}/preloadable_libintl.so %{_mandir}/man3/* %{_datadir}/%{name}/javaversion.class +%if %{buildjava} %doc gettext-runtime/intl-java/javadoc* +%endif %{_libdir}/%{name}/gnu.gettext.* @@ -256,6 +274,9 @@ fi %changelog +* Tue Dec 9 2008 Kedar Sovani - 0.17-8.fa1 +- Disable java build based on config options + * Fri Aug 29 2008 Ding-Yi Chen - 0.17-8 - Fix the build failure with koji. -- 1.5.3.3