Summary: GNU libraries and utilities for producing multi-lingual messages. Name: gettext Version: 0.17 Release: 1 License: GPLv3 and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/%{name}/ Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig Source2: libintl.so.1-aix32 Source3: libintl.so.1-aix64 Patch0: %{name}-%{version}-open-args.patch Patch1: %{name}-%{version}-autopoint-CVS-441481.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: patch %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. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for %{name} Group: Development/Tools License: LGPLv2+ Requires: %{name} = %{version}-%{release} %description devel This package contains all development related files necessary for developing or compiling applications/libraries that needs internationalization capability. You also need this package if you want to add gettext support for your project. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep export PATH=/opt/freeware/bin:$PATH %setup -q %patch0 %patch1 %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="xlc -q64" export CXX="xlC -q64" ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cp ./gettext-runtime/intl/.libs/libintl.so.8 runtime-libintl.so.8 cp ./gettext-runtime/libasprintf/.libs/libasprintf.so.0 . cp ./gettext-tools/libgettextpo/.libs/libgettextpo.so.0 . cp ./gettext-tools/intl/.libs/libintl.so.8 tools-libintl.so.8 cp ./gettext-tools/gnulib-lib/.libs/libgettextlib-0.17.so . cp ./gettext-tools/src/.libs/libgettextsrc-0.17.so . make distclean # now build the 32-bit version export CC="xlc" export CXX="xlC" ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects mv ./runtime-libintl.so.8 ./libintl.so.8 ${AR} -q ./gettext-runtime/intl/.libs/libintl.a ./libintl.so.8 ${AR} -q ./gettext-runtime/libasprintf/.libs/libasprintf.a ./libasprintf.so.0 ${AR} -q ./gettext-tools/libgettextpo/.libs/libgettextpo.a ./libgettextpo.so.0 mv ./tools-libintl.so.8 ./libintl.so.8 ${AR} -q ./gettext-tools/intl/.libs/libintl.a ./libintl.so.8 ${AR} -q ./gettext-tools/gnulib-lib/.libs/libgettextlib-0.17.a ./libgettextlib-0.17.so ${AR} -q ./gettext-tools/src/.libs/libgettextsrc-0.17.a ./libgettextsrc-0.17.so # Add the older libintl.so.1 shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') /usr/bin/strip -X32 -e %{SOURCE2} /usr/bin/strip -X64 -e %{SOURCE3} cp %{SOURCE2} libintl.so.1 /usr/bin/ar -X32 -q ./gettext-tools/intl/.libs/libintl.a libintl.so.1 cp %{SOURCE3} libintl.so.1 /usr/bin/ar -X64 -q ./gettext-tools/intl/.libs/libintl.a libintl.so.1 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*info* ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %post /sbin/install-info %{_infodir}/gettext.info.gz %{_infodir}/dir || : %preun if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/gettext.info.gz %{_infodir}/dir || : fi %post devel /sbin/install-info %{_infodir}/autosprintf.info.gz %{_infodir}/dir || : %preun devel if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/autosprintf.info.gz %{_infodir}/dir || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc gettext-runtime/ABOUT-NLS AUTHORS gettext-runtime/BUGS %doc COPYING gettext-tools/misc/DISCLAIM README %doc NEWS THANKS %doc gettext-runtime/man/*.1.html %doc gettext-runtime/intl/COPYING* %{_bindir}/[emnrx]* %{_bindir}/gettext %{_bindir}/gettext.sh %{_libdir}/libintl.a %{_libdir}/libgettextlib*.a %{_libdir}/libgettextsrc*.a %{_libdir}/%{name} %{_infodir}/gettext* %{_mandir}/man1/[emnrx]* %{_mandir}/man1/gettext.1 %{_datadir}/locale/* /usr/bin/[emnrx]* /usr/bin/gettext /usr/bin/gettext.sh /usr/lib/*.a %files devel %defattr(-,root,system,-) %doc gettext-runtime/man/*.3.html ChangeLog %doc gettext-runtime/intl-java/javadoc* %{_bindir}/autopoint %{_bindir}/gettextize %{_includedir}/* %{_libdir}/libasprintf.a %{_libdir}/libgettextpo.a %{_libdir}/*.la %{_mandir}/man1/autopoint.1 %{_mandir}/man1/gettextize.1 %{_mandir}/man3/* %{_infodir}/autosprintf* %{_datadir}/aclocal/* %{_datadir}/%{name} /usr/bin/autopoint /usr/bin/gettextize /usr/include/* /usr/lib/libasprintf.a /usr/lib/libgettextpo.a /usr/lib/*.la %changelog * Thu Mar 13 2008 Michael Perzl - 0.17-1 - first version for AIX V5.1 and higher