diff --git a/gettext.spec b/gettext.spec index b1b6b31..ce6f695 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,12 +1,11 @@ -# libintl.jar requires gcj >= 4.3 to build -%define buildjar 1 -%define buildjava 1 -%define buildcheck 1 +%bcond_without jar +%bcond_without java +%bcond_without check Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.17 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv3 and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -19,11 +18,12 @@ BuildRequires: automake >= 1.8 %endif BuildRequires: autoconf >= 2.5 BuildRequires: libtool, bison, gcc-c++ -%if %{buildjava} +%if %{with java} +# libintl.jar requires gcj >= 4.3 to build BuildRequires: gcc-java, libgcj # For javadoc BuildRequires: java-1.6.0-openjdk-devel -%if %{buildjar} +%if %{with jar} BuildRequires: %{_bindir}/fastjar # require zip and unzip for brp-java-repack-jars BuildRequires: zip, unzip @@ -87,24 +87,24 @@ This package contains libraries used internationalization support. %build [ -f %{_datadir}/automake/depcomp ] && cp -f %{_datadir}/automake/{depcomp,ylwrap} . -%if %{buildjava} +%if %{with java} export JAVAC=gcj -%if %{buildjar} +%if %{with jar} export JAR=fastjar %endif %endif %configure --without-included-gettext --enable-nls --disable-static \ --enable-shared --with-pic-=yes --disable-csharp \ -%if %{buildjava} +%if %{with java} --enable-java \ %else - --disable-java \ + --disable-java --disable-native-java \ %endif --disable-rpath -make %{?_smp_mflags} GCJFLAGS="-findirect-dispatch" - -# For generating gettext-tools/src/gnu.gettext.* -make -C gettext-tools/src gnu.gettext.DumpResource +make %{?_smp_mflags} \ +%if %{with java} + GCJFLAGS="-findirect-dispatch" +%endif %install @@ -142,7 +142,7 @@ rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext ## note libintl.jar does not build with gcj < 4.3 ## since it would not be fully portable -%if %{buildjar} +%if %{with jar} ### this is no longer needed since examples not packaged ## set timestamp of examples ChangeLog timestamp for brp-java-repack-jars #for i in `find ${RPM_BUILD_ROOT} examples -newer ChangeLog -type f -name ChangeLog`; do @@ -169,7 +169,7 @@ cat %{name}-*.lang > %{name}.lang rm -rf ${RPM_BUILD_ROOT} -%if %{buildcheck} +%if %{with check} %check ## For Koji build problem cp ${RPM_BUILD_ROOT}%{_libdir}/libgettext*-%{version}.so ${RPM_BUILD}gettext-tools/src/.libs @@ -230,13 +230,13 @@ fi %{_infodir}/gettext* %{_mandir}/man1/* %{_libdir}/%{name} -%if %{buildjava} +%if %{with java} %exclude %{_libdir}/%{name}/gnu.gettext.* %endif %dir %{_datadir}/%{name} %{_datadir}/%{name}/archive.tar.gz %{_datadir}/%{name}/styles -%if %{buildjar} +%if %{with jar} %{_datadir}/%{name}/libintl.jar %endif @@ -262,7 +262,7 @@ fi %{_mandir}/man3/* %{_datadir}/%{name}/javaversion.class %doc gettext-runtime/intl-java/javadoc* -%if %{buildjava} +%if %{with java} %{_libdir}/%{name}/gnu.gettext.* %endif @@ -274,6 +274,9 @@ fi %changelog +* Fri May 22 2009 Jens Petersen - 0.17-11 +- use bcond's for build switches + * Tue Feb 24 2009 Fedora Release Engineering - 0.17-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild