Summary: GNU libraries and utilities for producing multi-lingual messages. Name: gettext Version: 0.10.40 Release: 1 Copyright: LGPL/GPL Group: Development/Tools URL: http://www.gnu.org/software/gettext Source0: ftp://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.gz Prefix: %{_prefix} Buildroot: /var/tmp/gettext-root Buildrequires: libtool >= 1.3.5, automake >= 1.4, autoconf >= 2.13 %define DEFCC cc # automake forces -MD for the moment # Use --define 'no64 1' on the command line to disable 64bit build %{!?no64:%define BUILD64 1} %{?no64:%define BUILD64 0} %define prefix64 %{_prefix}/64 %description The GNU gettext package provides a set of tools and documentation for producing multi-lingual messages in programs. Tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs, a runtime library which supports the retrieval of translated messages, and stand-alone programs for handling the translatable and the already translated strings. Gettext provides an easy to use library and tools for creating, using, and modifying natural language catalogs and is a powerful and simple method for internationalizing programs. If you would like to internationalize or incorporate multi-lingual messages into programs that you're developing, you should install gettext. %prep rm -rf $RPM_BUILD_ROOT %setup -q %if %{BUILD64} == 1 # Prep 64-bit build in 64bit subdirectory ########################################## # Test whether we can run a 64bit command so we don't waste our time /usr/bin/locale64 >/dev/null 2>&1 mkdir 64bit cd 64bit gzip -dc %{SOURCE0} |tar -xf - cd %{name}-%{version} %endif %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if [[ "$CC" != "gcc" ]] then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` fi export OBJECT_MODE=32 #just in case libtoolize --copy --force ./aclocal.sh aclocal -I m4 if [[ "$CC" != "gcc" ]]; then automake --foreign --include-deps ./Makefile else automake --gnu --include-deps ./Makefile fi M4=%{_prefix}/bin/m4 autoconf CFLAGS="$RPM_OPT_FLAGS" ./configure \ --enable-shared --with-included-gettext --prefix=%{prefix} cp -p ${_prefix}/bin/libtool . M4=%{_prefix}/bin/m4 make %if %{BUILD64} == 1 # Now build again as 64bit ########################### cd 64bit/%{name}-%{version} export OBJECT_MODE=64 libtoolize --copy --force ./aclocal.sh aclocal -I m4 if [[ "$CC" != "gcc" ]]; then automake --foreign --include-deps ./Makefile else automake --gnu --include-deps ./Makefile fi M4=%{_prefix}/bin/m4 autoconf CFLAGS="$RPM_OPT_FLAGS" ./configure \ --enable-shared --with-included-gettext --prefix=%{prefix64} cp -p ${_prefix}/bin/libtool . M4=%{_prefix}/bin/m4 make # Go back to 32-bit library and add our 64bit shared object # into same archive cd ../../intl/.libs /usr/bin/ar -q libintl.a ../../64bit/%{name}-%{version}/intl/.libs/libintl.so.* %endif #64bit %install rm -rf $RPM_BUILD_ROOT make install prefix=$RPM_BUILD_ROOT%{_prefix} (cd $RPM_BUILD_ROOT rm -f ./usr/info/dir rm -f ./opt/freeware/info/dir gzip -9nf .%{_prefix}/info/* /usr/bin/strip .%{_prefix}/bin/* || : cd $RPM_BUILD_ROOT for dir in bin include do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{prefix}/$dir/* . cd - done mkdir -p usr/lib cd usr/lib ln -sf ../..%{prefix}/lib/* . cd - mkdir -p usr/share ln -sf ../..%{_prefix}/share/gettext . ) ( cd $RPM_BUILD_ROOT/%{prefix}/lib # Create a compatibility member to mitigate differences with Bull Freeware # offering COMPATMEMBER=shr.o for lib in *.a do /usr/bin/dump -X32 -Tv $lib |/usr/bin/awk 'match($4,"EXP|Exp") { print $NF }' > tmp.exp libbase=`print $lib | sed -e 's/.a$//' -e 's/^lib//'` ld -L. -bI:tmp.exp -bE:tmp.exp -l$libbase -bM:SRE -bnoentry -o $COMPATMEMBER /usr/bin/strip -e $COMPATMEMBER # Make shr.o a load-only module /usr/bin/ar -r $lib $COMPATMEMBER rm -f $COMPATMEMBER tmp.exp done ) %if %{BUILD64} == 1 #Add links for 64-bit library members ( mkdir -p $RPM_BUILD_ROOT/%{prefix64}/lib cd $RPM_BUILD_ROOT/%{prefix64}/lib ln -s ../../lib/*.a . ) %endif %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info %{_prefix}/info/gettext.info.gz %{_prefix}/info/dir %preun if [ "$1" = 0 ]; then /sbin/install-info --delete %{_prefix}/info/gettext.info.gz %{_prefix}/info/dir fi exit 0 %files %defattr(-,root,root) /usr/bin/* /usr/include/* /usr/lib/l* %{_prefix}/bin/* %{_prefix}/lib/l* %{_prefix}/info/* %{_prefix}/include/* %dir %{_prefix}/share/gettext %{_prefix}/share/gettext/* %{_prefix}/share/locale/*/LC_MESSAGES/* %{_prefix}/share/aclocal/* %if %{BUILD64} == 1 %{prefix64}/lib/l* %endif %changelog * Thu Feb 12 2004 David Clissold 0.10.40-1 - Add 64-bit libintl.a build. Also bump to 0.10.40. * Wed Apr 24 2002 David Clissold - No functional change. Minor clarification in documented - listing of country/region codes (per political requirement). * Tue Aug 14 2001 David Clissold - Update to version 0.10.39 * Tue May 29 2001 David Clissold - Yet another new version available. Update to version 0.38 * Thu May 24 2001 David Clissold - Update to version 0.37 * Wed Mar 21 2001 Marc Stephenson - Build both 32- and 64-bit libraries * Thu Feb 15 2001 aixtoolbox - Account for different standard lib location in IA64 32-bit ABI * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Sun Feb 27 2000 Cristian Gafton - add --comments to msghack * Thu Feb 10 2000 Cristian Gafton - fix bug #9240 - gettextize has the right aclocal patch * Wed Jan 12 2000 Cristian Gafton - add the --diff and --dummy options * Wed Oct 06 1999 Cristian Gafton - add the --missing option to msghack * Wed Sep 22 1999 Cristian Gafton - updated msghack not to merge in fuzzies in the master catalogs * Thu Aug 26 1999 Cristian Gafton - updated msghack to understand --append * Wed Aug 11 1999 Cristian Gafton - updated msghack to correctly deal with sorting files * Thu May 06 1999 Cristian Gafton - msghack updates * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 8) * Mon Mar 08 1999 Cristian Gafton - added patch for misc hacks to facilitate rpm translations * Thu Dec 03 1998 Cristian Gafton - patch to allow to build on ARM * Wed Sep 30 1998 Jeff Johnson - add Emacs po-mode.el files. * Sun Sep 13 1998 Cristian Gafton - include the aclocal support files * Fri Sep 3 1998 Bill Nottingham - remove devel package (functionality is in glibc) * Tue Sep 1 1998 Jeff Johnson - update to 0.10.35. * Mon Jun 29 1998 Jeff Johnson - add gettextize. - create devel package for libintl.a and libgettext.h. * Mon Apr 27 1998 Prospector System - translations modified for de, fr, tr * Sun Nov 02 1997 Cristian Gafton - added info handling - added misc-patch (skip emacs-lisp modofications) * Sat Nov 01 1997 Erik Troan - removed locale.aliases as we get it from glibc now - uses a buildroot * Mon Jun 02 1997 Erik Troan - Built against glibc