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