# # spec file for package gettext-java (Version 0.17) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: gettext-java BuildRequires: fdupes gcc-c++ gcc-java perl-libintl-perl tcl Url: http://www.gnu.org/software/gettext/ License: LGPLv2.1+ Group: Development/Tools/Other AutoReqProv: on Version: 0.17 Release: 113 Summary: Java Support for Native Language Support (NLS) PreReq: %{install_info_prereq} BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gettext-%{version}.tar.bz2 Source1: gettext-rpmlintrc Source2: suse-start-po-mode.el Source3: gettext-linkdupes.sh Patch: gettext-0.12.1-sigfpe.patch Patch2: gettext-0.12.1-gettextize.patch Patch3: gettext-codecleanup.patch Patch4: po-mode.diff Patch5: gettext-initialize_vars.patch Patch6: gettext-0.15-docdir.diff Patch7: gettext-autotools.patch Patch8: gettext-gl_AC_TYPE_LONG_LONG.patch Patch9: gettext-needlessly_init_vars.patch Patch10: gettext-open_missing_mode.patch Patch11: gettext-typo_to_segfault.patch Patch12: gettext-0.17-no-autoconf-tests.diff %description This package includes the tools needed to support message catalogs in Java applications. It also includes example code for java, java+awt and java+swing. %prep %setup -q -n gettext-%{version} %patch %patch2 %patch3 %patch4 %patch5 %patch6 -p1 %patch7 %patch8 %patch9 %patch10 %patch11 %patch12 # fix build with new autoconf # see comments in the file and # http://www.mail-archive.com/bug-gnulib@gnu.org/msg12384.html rm -f gettext-tools/gnulib-m4/openmp.m4 pushd gettext-tools/misc tar xfz archive.tar.gz find . -name gettext.m4,v -print0 | xargs -0 perl -spi -e 's/\(int\) /\(long\) /g' tar cfz archive.tar.gz archive/ popd autoreconf -fiv %build export CFLAGS="$RPM_OPT_FLAGS -pipe -W -Wall -Dgcc_is_lint" export CXXFLAGS="$RPM_OPT_FLAGS -pipe -W -Wall -Dgcc_is_lint" %configure --enable-shared make GMSGFMT=../src/msgfmt %install export LC_CTYPE=ISO-8859-15 make -C gettext-tools/gnulib-lib install DESTDIR=$RPM_BUILD_ROOT make -C gettext-tools/src install DESTDIR=$RPM_BUILD_ROOT make -C gettext-runtime/intl-java install DESTDIR=$PWD docdir=/docs make -C gettext-tools/examples install DESTDIR=$PWD docdir=/allexamples mkdir -p docs/examples mv allexamples/examples/*java* docs/examples cd docs/examples fdupes -r *|while read dupe; do if [ -z "$dupe" ]; then startlink= elif [ -z "$startlink" ]; then startlink="$dupe" else ln -f "$startlink" "$dupe" fi done cd .. find -size 0 -print0 | xargs -0 --no-run-if-empty rm rm -rf $RPM_BUILD_ROOT/%{_datadir}/* mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} cp -av * $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} cd ../allexamples/examples rm -rf *csharp* fdupes -r * | while read dupe; do if [ -z "$dupe" ]; then startlink= elif [ -z "$startlink" ]; then startlink="$dupe" else echo "ln -f '$startlink' '$dupe'" >>../../gettext-linkdupes.sh fi done diff %{SOURCE3} . || { cat <