Summary: Character set conversion library, portable iconv implementation Name: libiconv Version: 1.13.1 Release: 1 Group: System Environment/Libraries License: LGPL URL: http://www.gnu.org/software/libiconv/ Source0: http://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source1: http://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz.sig BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gettext >= 0.17 Requires: gettext >= 0.17 %description GNU libiconv provides an iconv() implementation for use on systems which don't have one or whose implementation cannot convert from/to Unicode. It supports all the important encodings in use today. The library is available as 32-bit and 64-bit. 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 %setup -q %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="cc -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --enable-static \ --enable-extra-encodings make %{?_smp_mflags} cp lib/.libs/libiconv.so.2 . cp libcharset/lib/.libs/libcharset.so.1 . make distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --enable-static \ --enable-extra-encodings make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q lib/.libs/libiconv.a ./libiconv.so.2 ${AR} -q libcharset/lib/.libs/libcharset.a ./libcharset.so.1 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # ugly hack to fix the interaction with /lib/libiconv.a cp lib/.libs/libiconv.a ${RPM_BUILD_ROOT}%{_libdir} export AR="ar -X32_64" cd /tmp list=`${AR} -t /lib/libiconv.a` ${AR} -x /lib/libiconv.a cat ${list} | xargs strip -X32_64 -e for f in ${list} ; do ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/libiconv.a ${f} done ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/linux/${dir} cd usr/linux/${dir} ln -sf ../../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc AUTHORS* COPYING.LIB* ChangeLog* DESIGN* %doc INSTALL.generic* NEWS* NOTES* PORTS* README* THANKS* %{_bindir}/* %{_includedir}/* %{_libdir}/*.*a %{_mandir}/man?/* %{_datadir}/locale/* /usr/linux/bin/* /usr/linux/include/* /usr/linux/lib/*.a* %changelog * Thu Jul 02 2009 Michael Perzl - 1.13-1 - updated to version 1.13.1 * Thu Jul 02 2009 Michael Perzl - 1.13-1 - updated to version 1.13 * Thu Oct 16 2008 Michael Perzl - 1.12-2 - fixed the generation of the 64-bit version of the library * Sat Mar 28 2008 Michael Perzl - 1.12-1 - first version for AIX V5.1 and higher